From: <ag...@us...> - 2011-12-14 20:49:24
|
Revision: 2645 http://zoolib.svn.sourceforge.net/zoolib/?rev=2645&view=rev Author: agreen Date: 2011-12-14 20:49:18 +0000 (Wed, 14 Dec 2011) Log Message: ----------- Use ZQ to indicate success/failure, as Map is no longer a truthy/falsey type. Modified Paths: -------------- trunk/zoolib/source/cxx/more/zoolib/photoshop/ZPhotoshop_Val.cpp trunk/zoolib/source/cxx/more/zoolib/photoshop/ZPhotoshop_Val.h Modified: trunk/zoolib/source/cxx/more/zoolib/photoshop/ZPhotoshop_Val.cpp =================================================================== --- trunk/zoolib/source/cxx/more/zoolib/photoshop/ZPhotoshop_Val.cpp 2011-12-14 20:48:14 UTC (rev 2644) +++ trunk/zoolib/source/cxx/more/zoolib/photoshop/ZPhotoshop_Val.cpp 2011-12-14 20:49:18 UTC (rev 2645) @@ -791,17 +791,17 @@ return *this; } -Map Spec::Get() const +ZQ<Map> Spec::QGet() const { - Map result; if (PIActionReference theRef = this->MakeRef()) { + Map result; OSErr theErr = spPSActionControl->Get(&result.OParam(), theRef); - if (noErr != theErr) - result.Clear(); spPSActionReference->Free(theRef); + if (noErr == theErr) + return result; } - return result; + return null; } PIActionReference Spec::MakeRef() const Modified: trunk/zoolib/source/cxx/more/zoolib/photoshop/ZPhotoshop_Val.h =================================================================== --- trunk/zoolib/source/cxx/more/zoolib/photoshop/ZPhotoshop_Val.h 2011-12-14 20:48:14 UTC (rev 2644) +++ trunk/zoolib/source/cxx/more/zoolib/photoshop/ZPhotoshop_Val.h 2011-12-14 20:49:18 UTC (rev 2645) @@ -171,7 +171,7 @@ Spec operator+(const Spec& iOther); Spec& operator+=(const Spec& iOther); - Map Get() const; + ZQ<Map> QGet() const; PIActionReference MakeRef() const; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |