bug-commoncpp
[Top][All Lists]
Advanced

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

Re: recent persist.cpp change


From: Federico Montesino Pouzols
Subject: Re: recent persist.cpp change
Date: Wed, 12 Feb 2003 10:17:39 +0100
User-agent: Mutt/1.4i

        Yes, I think you are right, thanks for pointing it out. I have
reverted it to the previous '==' assertion.

On Tue, Feb 11, 2003 at 04:27:23PM -0800, Chad Yates wrote:
> I think the change to the assert statement:
> 
> void TypeManager::add(const char* name, NewBaseObjectFunction construction)
> {
>   if (refCount++ == 0)
>   {
>     theInstantiationFunctions = new StringFunctionMap;
>   }
>   assert(_internal_GetMap().find(string(name)) != _internal_GetMap().end());
>   _internal_GetMap()[string(name)] = construction;
> }
> 
> in persist.cpp was incorrect.  it is supposed to assert that the persistable
> class has only been added to the type manager once.  hence the find() should
> not find anything in the stl map and therefore should return end().
> 
> it should be == not !=
> 
> if you have some other info I don't know about, please correct me.
> 
> ,chad
> 




reply via email to

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