diff options
Diffstat (limited to 'indra/llcommon/llsdserialize_xml.cpp')
-rwxr-xr-x | indra/llcommon/llsdserialize_xml.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/indra/llcommon/llsdserialize_xml.cpp b/indra/llcommon/llsdserialize_xml.cpp index 4e2af0e589..8d72a1c329 100755 --- a/indra/llcommon/llsdserialize_xml.cpp +++ b/indra/llcommon/llsdserialize_xml.cpp @@ -35,7 +35,7 @@ extern "C" { -#ifdef LL_STANDALONE +#ifdef LL_USESYSTEMLIBS # include <expat.h> #else # include "expat/expat.h" @@ -168,8 +168,8 @@ S32 LLSDXMLFormatter::format_impl(const LLSD& data, std::ostream& ostr, U32 opti break; case LLSD::TypeString: - if(data.asString().empty()) ostr << pre << "<string />" << post; - else ostr << pre << "<string>" << escapeString(data.asString()) <<"</string>" << post; + if(data.asStringRef().empty()) ostr << pre << "<string />" << post; + else ostr << pre << "<string>" << escapeString(data.asStringRef()) <<"</string>" << post; break; case LLSD::TypeDate: @@ -182,7 +182,7 @@ S32 LLSDXMLFormatter::format_impl(const LLSD& data, std::ostream& ostr, U32 opti case LLSD::TypeBinary: { - LLSD::Binary buffer = data.asBinary(); + const LLSD::Binary& buffer = data.asBinary(); if(buffer.empty()) { ostr << pre << "<binary />" << post; @@ -375,13 +375,10 @@ S32 LLSDXMLParser::Impl::parse(std::istream& input, LLSD& data) { break; } + count = get_till_eol(input, (char *)buffer, BUFFER_SIZE); + if (!count) { - - count = get_till_eol(input, (char *)buffer, BUFFER_SIZE); - if (!count) - { - break; - } + break; } status = XML_ParseBuffer(mParser, count, false); |