From: <ag...@us...> - 2012-01-12 23:16:24
|
Revision: 2674 http://zoolib.svn.sourceforge.net/zoolib/?rev=2674&view=rev Author: agreen Date: 2012-01-12 23:16:18 +0000 (Thu, 12 Jan 2012) Log Message: ----------- Harminize body of With and WithUnchanged. Modified Paths: -------------- trunk/zoolib/source/cxx/zoolib/ZCog.h Modified: trunk/zoolib/source/cxx/zoolib/ZCog.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZCog.h 2012-01-11 21:31:41 UTC (rev 2673) +++ trunk/zoolib/source/cxx/zoolib/ZCog.h 2012-01-12 23:16:18 UTC (rev 2674) @@ -827,17 +827,19 @@ { ZAssert(sIsPending(lCog0) && sIsPending(iCog1)); - if (sCallPendingCog_Changed(lCog0, iParam)) - return lCog0; + if (sCallPendingCog_Unchanged(lCog0, iParam)) + { + ZCog<Param> newCog1 = iCog1; + if (sCallPendingCog_Unchanged(newCog1, iParam)) + return iSelf; - ZCog<Param> newCog1 = iCog1; - if (sCallPendingCog_Unchanged(newCog1, iParam)) - return iSelf; + if (sIsFinished(newCog1)) + return lCog0; - if (sIsFinished(newCog1)) - return lCog0; + return spCog_WithUnchanged(lCog0, newCog1); + } - return spCog_WithUnchanged(lCog0, newCog1); + return lCog0; } template <class Param> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |