Fix use of NULL in integer return value.
authorcantor <cantor@de75baf8-a10c-0410-a50a-987c0e22f00f>
Wed, 26 Sep 2007 20:08:37 +0000 (20:08 +0000)
committercantor <cantor@de75baf8-a10c-0410-a50a-987c0e22f00f>
Wed, 26 Sep 2007 20:08:37 +0000 (20:08 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-xmltooling/trunk@393 de75baf8-a10c-0410-a50a-987c0e22f00f

xmltooling/base.h

index 237f798..3a7fe84 100644 (file)
 #define DECL_INTEGER_CONTENT(proper) \
     XMLTOOLING_DOXYGEN(Returns proper in integer form after a NULL indicator.) \
     std::pair<bool,int> get##proper() const { \
 #define DECL_INTEGER_CONTENT(proper) \
     XMLTOOLING_DOXYGEN(Returns proper in integer form after a NULL indicator.) \
     std::pair<bool,int> get##proper() const { \
-        return std::make_pair((getTextContent()!=NULL), (getTextContent()!=NULL ? xercesc::XMLString::parseInt(getTextContent()) : NULL)); \
+        return std::make_pair((getTextContent()!=NULL), (getTextContent()!=NULL ? xercesc::XMLString::parseInt(getTextContent()) : 0)); \
     } \
     XMLTOOLING_DOXYGEN(Sets proper.) \
     void set##proper(int proper) { \
     } \
     XMLTOOLING_DOXYGEN(Sets proper.) \
     void set##proper(int proper) { \