]> git.lyx.org Git - features.git/commitdiff
added a const_cast
authorLars Gullik Bjønnes <larsbj@gullik.org>
Wed, 27 Oct 1999 01:02:53 +0000 (01:02 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Wed, 27 Oct 1999 01:02:53 +0000 (01:02 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@257 a592a061-630c-0410-9148-cb99ea01b6c8

ChangeLog
src/LyXAction.C

index 25e038603b7f2c410e43b2e183ca68ea185fe32a..1a97629bb07018b1c28e2ba78a6199a47f6cac92 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 1999-10-27  Lars Gullik Bjønnes  <larsbj@lyx.org>
 
+       * src/LyXAction.C (LookupFunc): added a workaround for sun
+       compiler, on the other hand...we don't know if the current code
+       compiles on sun at all...
+
        * src/support/filetools.C (CleanupPath): subst fix
 
        * src/insets/insetbib.C (delDatabase): subst fix, this looks
index 15c535bd6bf36a694f774514b6eb48c99a8bbd52..89ec88a6053281a62879c4b9d7bbcde421389ffd 100644 (file)
@@ -499,7 +499,7 @@ int LyXAction::retrieveActionArg(int i, char const** arg)
 
 
 // Returns an action tag from a string.
-int LyXAction::LookupFunc(char const *func)
+int LyXAction::LookupFunc(char const * func)
 {
        if (!func) 
                return LFUN_UNKNOWN_ACTION;         
@@ -510,7 +510,9 @@ int LyXAction::LookupFunc(char const *func)
       valid func table slot. RVDK_PATCH_5 */
        int k, l= 0, r = funcCount;
        int action = LFUN_UNKNOWN_ACTION;
-       char *arg = strchr(func, ' ');
+       char * arg = strchr(const_cast<char*>(func), ' '); // const cast to
+       // help a sun complier, will go away when this func is rewritten
+       // to use std::containers and std::string.
 
        if (arg) *(arg++) = '\0';