From e8728756ec96bdb4446c38d422e54d3f25b0642e Mon Sep 17 00:00:00 2001 From: Scott Cantor Date: Sun, 25 Dec 2011 00:35:59 +0000 Subject: [PATCH] Solaris fixes --- xmltooling/base.h | 10 ++++++---- xmltooling/util/ParserPool.cpp | 3 +-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/xmltooling/base.h b/xmltooling/base.h index 5ae111c..664a6a0 100644 --- a/xmltooling/base.h +++ b/xmltooling/base.h @@ -698,8 +698,9 @@ } \ void set##proper(int proper) { \ try { \ - xmltooling::xstring buf = boost::lexical_cast(proper); \ - set##proper(buf.c_str()); \ + std::string buf(boost::lexical_cast(proper)); \ + xmltooling::auto_ptr_XMLCh widen(buf.c_str()); \ + set##proper(widen.get()); \ } \ catch (boost::bad_lexical_cast&) { \ } \ @@ -1253,8 +1254,9 @@ XMLTOOLING_DOXYGEN(Sets proper.) \ void set##proper(int proper) { \ try { \ - xmltooling::xstring buf = boost::lexical_cast(proper); \ - setTextContent(buf.c_str()); \ + std::string buf(boost::lexical_cast(proper)); \ + xmltooling::auto_ptr_XMLCh widen(buf.c_str()); \ + setTextContent(widen.get()); \ } \ catch (boost::bad_lexical_cast&) { \ } \ diff --git a/xmltooling/util/ParserPool.cpp b/xmltooling/util/ParserPool.cpp index 42fc535..712b121 100644 --- a/xmltooling/util/ParserPool.cpp +++ b/xmltooling/util/ParserPool.cpp @@ -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. - boost::bind(static_cast(&ParserPool::loadCatalog), - boost::ref(this), boost::bind(&string::c_str, _1)) + boost::bind(static_cast(&ParserPool::loadCatalog), this, boost::bind(&string::c_str, _1)) ); return catpaths.begin() != catpaths.end(); } -- 2.1.4