Solaris fixes
authorScott Cantor <cantor.2@osu.edu>
Sun, 25 Dec 2011 00:35:59 +0000 (00:35 +0000)
committerScott Cantor <cantor.2@osu.edu>
Sun, 25 Dec 2011 00:35:59 +0000 (00:35 +0000)
xmltooling/base.h
xmltooling/util/ParserPool.cpp

index 5ae111c..664a6a0 100644 (file)
         } \
         void set##proper(int proper) { \
             try { \
         } \
         void set##proper(int proper) { \
             try { \
-                xmltooling::xstring buf = boost::lexical_cast<xmltooling::xstring>(proper); \
-                set##proper(buf.c_str()); \
+                std::string buf(boost::lexical_cast<std::string>(proper)); \
+                xmltooling::auto_ptr_XMLCh widen(buf.c_str()); \
+                set##proper(widen.get()); \
             } \
             catch (boost::bad_lexical_cast&) { \
             } \
             } \
             catch (boost::bad_lexical_cast&) { \
             } \
     XMLTOOLING_DOXYGEN(Sets proper.) \
     void set##proper(int proper) { \
         try { \
     XMLTOOLING_DOXYGEN(Sets proper.) \
     void set##proper(int proper) { \
         try { \
-            xmltooling::xstring buf = boost::lexical_cast<xmltooling::xstring>(proper); \
-            setTextContent(buf.c_str()); \
+            std::string buf(boost::lexical_cast<std::string>(proper)); \
+            xmltooling::auto_ptr_XMLCh widen(buf.c_str()); \
+            setTextContent(widen.get()); \
         } \
         catch (boost::bad_lexical_cast&) { \
         } \
         } \
         catch (boost::bad_lexical_cast&) { \
         } \
index 42fc535..712b121 100644 (file)
@@ -244,8 +244,7 @@ bool ParserPool::loadCatalogs(const char* pathnames)
     for_each(
         catpaths.begin(), catpaths.end(),
         // Call loadCatalog with an inner call to s->c_str() on each entry.
     for_each(
         catpaths.begin(), catpaths.end(),
         // Call loadCatalog with an inner call to s->c_str() on each entry.
-        boost::bind(static_cast<bool (ParserPool::*)(const char*)>(&ParserPool::loadCatalog),
-            boost::ref(this), boost::bind(&string::c_str, _1))
+        boost::bind(static_cast<bool (ParserPool::*)(const char*)>(&ParserPool::loadCatalog), this, boost::bind(&string::c_str, _1))
         );
     return catpaths.begin() != catpaths.end();
 }
         );
     return catpaths.begin() != catpaths.end();
 }