aspell-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [aspell-devel] aspell-0.60-20040416 bug in string_map.hpp


From: Kevin Atkinson
Subject: Re: [aspell-devel] aspell-0.60-20040416 bug in string_map.hpp
Date: Sat, 24 Apr 2004 15:36:30 -0400 (EDT)

On 24 Apr 2004, Karl Chen wrote:

> >>>>> "Kevin" == Kevin Atkinson <address@hidden> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]