X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=xmltooling%2Fbase.h;fp=xmltooling%2Fbase.h;h=664a6a0407a06dce02a60f21cd2d7d811fc99cff;hb=e8728756ec96bdb4446c38d422e54d3f25b0642e;hp=5ae111c5a3e4eecd756ce0f97015c99dd2bf049b;hpb=6a6c517d1f93984f726937b8e0f15e78196c6ff9;p=shibboleth%2Fcpp-xmltooling.git 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&) { \ } \