[mapguide-commits] r5205 - trunk/MgDev/Common/CoordinateSystem

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Tue Sep 28 12:58:23 EDT 2010


Author: NormOlsen
Date: 2010-09-28 16:58:23 +0000 (Tue, 28 Sep 2010)
New Revision: 5205

Modified:
   trunk/MgDev/Common/CoordinateSystem/MentorDictionary.h
Log:
The template function ?\226?\128?\156UpdateDef?\226?\128?\157 of MentorDictionary.h is where we have to check if a definition is valid before we can really update it in the dictionary. However the check condition is not correct. It should be that only when the definition is invalid that ?\226?\128?\156MgInvalidArgumentException?\226?\128?\157 is thrown. But instead, it is the contrary.  So we should add a ?\226?\128?\156not?\226?\128?\157 operator before CALL_MEMBER_FN macro  to correct the logic.



Modified: trunk/MgDev/Common/CoordinateSystem/MentorDictionary.h
===================================================================
--- trunk/MgDev/Common/CoordinateSystem/MentorDictionary.h	2010-09-28 15:23:43 UTC (rev 5204)
+++ trunk/MgDev/Common/CoordinateSystem/MentorDictionary.h	2010-09-28 16:58:23 UTC (rev 5205)
@@ -130,7 +130,7 @@
         }
 
         //Make sure the def they've given us is valid
-        if (NULL != isValid && CALL_MEMBER_FN(kpDef, isValid)())
+        if (NULL != isValid && !CALL_MEMBER_FN(kpDef, isValid)())
         {
             throw new MgInvalidArgumentException(L"MentorDictionary.UpdateDef", __LINE__, __WFILE__, NULL, L"", NULL);
         }



More information about the mapguide-commits mailing list