|
From: Lark <lar...@ya...> - 2001-03-24 19:47:34
|
At 11:14 AM -0500 3/24/01, Charles Lechasseur wrote:
>string rename(const string& s) {
> return (mRename.find(s) != mRename.end() ? mRename[s] : s);
>}
>
>and i've changed line 897 in Scribia.l from
>
>const string& theItem = rename(yytext);
>
>to
>
>string theItem = rename(yytext);
>
>this solves the crashing problem and doesn't seem to cause other problems
>so i've committed my changes.
>
>Checking in scribia/Source/CScribiaDoc.h;
>/cvsroot/scribia/scribia/Source/CScribiaDoc.h,v <-- CScribiaDoc.h
>new revision: 1.21; previous revision: 1.20
>done
>Checking in scribia/Source/Scribia.l;
>/cvsroot/scribia/scribia/Source/Scribia.l,v <-- Scribia.l
>new revision: 1.33; previous revision: 1.32
>done
>
>nevertheless, Lark, if you could confirm that rename wasn't to be used to
>change the returning string, i'd feel better. thanks!
Looks good! Actually, we probably could return a const string&,
mRename is supposed to be constant anyway (but can't really be
declared that way.)
--
Lark <lar...@ya...>
|