On 24 Apr 2004, Karl Chen wrote: > >>>>> "Kevin" == Kevin Atkinson <[EMAIL PROTECTED]> writes: > Kevin> > Kevin> On 24 Apr 2004, Karl Chen wrote: > >> > >> I had to make the following change to get aspell 20040416 > >> snapshot to compile with gcc 3.3: > Kevin> > >> StringMap(const StringMap & other) : empty_str() {} > >> {copy(other);} > Kevin> > Kevin> I'm sorry. This is invalid C++ code. Furthermore > Kevin> since Gcc 3.3 is probably ignoring the {copy(other);} > Kevin> it is also not doing the correct thing. Exactly what > Kevin> error are you getting. > > > Urh, oops! I copied&pasted the wrong patch somehow. I meant: > > StringMap(const StringMap & other) : empty_str() {copy(other);}
Ok fixed. > Gcc 3.3 requires constants (empty_str) to be initialized. (BTW, > you could probably make it static const or just write the value > instead of empty_str) Its a minor memory optimization. The idea is to avoid having to dereference a distant memory location just to discover that it is the empty string. -- http://kevin.atkinson.dhs.org _______________________________________________ Aspell-devel mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/aspell-devel