From: <ag...@us...> - 2011-11-25 20:46:23
|
Revision: 2622 http://zoolib.svn.sourceforge.net/zoolib/?rev=2622&view=rev Author: agreen Date: 2011-11-25 20:46:17 +0000 (Fri, 25 Nov 2011) Log Message: ----------- Fix sCog_Not. Modified Paths: -------------- trunk/zoolib/source/cxx/zoolib/ZCog.h Modified: trunk/zoolib/source/cxx/zoolib/ZCog.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZCog.h 2011-11-25 20:39:09 UTC (rev 2621) +++ trunk/zoolib/source/cxx/zoolib/ZCog.h 2011-11-25 20:46:17 UTC (rev 2622) @@ -178,17 +178,18 @@ ZCog<Param> spCogFun_Not(const ZCog<Param>& iSelf, Param iParam, const ZCog<Param>& iCog) { - if (iCog && not sIsTerm(iCog)) - { - const ZCog<Param> newCog = iCog->Call(iCog, iParam); - if (not newCog || sIsTerm(newCog)) - return iCog; - } - return iSelf; + if (not iCog || sIsTerm(iCog)) + return iSelf; + + const ZCog<Param> newCog = iCog->Call(iCog, iParam); + if (not newCog || sIsTerm(newCog)) + return iSelf; + + return null; } template <class Param> -const ZCog<Param>& sCog_Not +ZCog<Param> sCog_Not (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable) { static ZMACRO_auto(spCallable, sCallable(spCogFun_Not<Param>)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |