Fix use of NULL in integer return value.
[shibboleth/cpp-xmltooling.git] / xmltooling / base.h
index 4c6e8dc..3a7fe84 100644 (file)
   #include <xmltooling/config_pub.h>
 #endif
 
+#ifdef XMLTOOLING_LITE
+# define XMLTOOLING_NO_XMLSEC 1
+#endif
+
 // Windows and GCC4 Symbol Visibility Macros
 #ifdef WIN32
   #define XMLTOOL_IMPORT __declspec(dllimport)
@@ -77,7 +81,7 @@
 #define MAKE_NONCOPYABLE(type) \
     private: \
         type(const type&); \
-        type& operator=(const type&);
+        type& operator=(const type&)
 
 #ifndef DOXYGEN_SKIP
 #ifndef NULL
 #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) { \
@@ -1509,7 +1513,7 @@ namespace xmltooling {
          * 
          * @param p   a pair in which the second component is the object to delete
          */
-        void operator()(const std::pair<A,B*>& p) {delete p.second;}
+        void operator()(const std::pair<const A,B*>& p) {delete p.second;}
     };
 
     /**
@@ -1522,7 +1526,7 @@ namespace xmltooling {
          * 
          * @param p   a pair in which the second component is the const object to delete
          */
-        void operator()(const std::pair<A,const B*>& p) {delete const_cast<B*>(p.second);}
+        void operator()(const std::pair<const A,const B*>& p) {delete const_cast<B*>(p.second);}
     };
 };