diff --git a/indra/llcommon/llsdserialize.cpp b/indra/llcommon/llsdserialize.cpp index 22b24a06b4f644078a83997d306914c9f3f4ef99..cf2df1f80b48407b790cd806da6f387c84708726 100644 --- a/indra/llcommon/llsdserialize.cpp +++ b/indra/llcommon/llsdserialize.cpp @@ -2097,7 +2097,8 @@ std::string zip_llsd(LLSD& data) { //copy result into output if (strm.avail_out >= CHUNK) { - free(output); + if(output) + free(output); LL_WARNS() << "Failed to compress LLSD block." << LL_ENDL; return std::string(); } @@ -2120,7 +2121,8 @@ std::string zip_llsd(LLSD& data) } else { - free(output); + if(output) + free(output); LL_WARNS() << "Failed to compress LLSD block." << LL_ENDL; return std::string(); } @@ -2131,7 +2133,8 @@ std::string zip_llsd(LLSD& data) std::string result((char*) output, size); deflateEnd(&strm); - free(output); + if(output) + free(output); return result; } diff --git a/indra/llcommon/llsdserialize.h b/indra/llcommon/llsdserialize.h index 9702eca57336c0079aef237ac3a782197ac2593c..d4bba6a4cfe87d18e624cf5ff1e5aeb4025f4c3a 100644 --- a/indra/llcommon/llsdserialize.h +++ b/indra/llcommon/llsdserialize.h @@ -502,7 +502,7 @@ class LL_COMMON_API LLSDFormatter : public LLRefCount void formatReal(LLSD::Real real, std::ostream& ostr) const; bool mBoolAlpha; - std::unique_ptr<absl::ParsedFormat<absl::FormatConversionCharSet::kFloating> > mRealFormat; + std::string mRealFormat; EFormatterOptions mOptions; }; diff --git a/indra/llcommon/llsdserialize_xml.cpp b/indra/llcommon/llsdserialize_xml.cpp index e61a6000e22b0788bcf7d8d8881b011e87727b17..c751288c4d6e675ab10f853bcdc7d661b20bc599 100644 --- a/indra/llcommon/llsdserialize_xml.cpp +++ b/indra/llcommon/llsdserialize_xml.cpp @@ -150,7 +150,7 @@ S32 LLSDXMLFormatter::format_impl(const LLSD& data, std::ostream& ostr, case LLSD::TypeReal: ostr << pre << "<real>"; - if(!mRealFormat) + if(mRealFormat.empty()) { ostr << data.asReal(); } diff --git a/indra/newview/alaoengine.cpp b/indra/newview/alaoengine.cpp index 30b4f7bbd861fee24bf4699784388e718cb33a9e..ad35646a6512ca7c438b272336426af7d67ea4ca 100644 --- a/indra/newview/alaoengine.cpp +++ b/indra/newview/alaoengine.cpp @@ -1890,13 +1890,13 @@ void ALAOEngine::processImport(bool aFromTimer) { if (state->mCycleTime) { - const std::string oldName = state->mName; - state->mName = absl::StrFormat("%s%d",oldName + ":CT",state->mCycleTime); + const std::string oldName = state->mName + ":CT"; + state->mName = llformat("%s%d",oldName.c_str(),state->mCycleTime); } if (state->mCycle) { - const std::string oldName = state->mName; - state->mName = absl::StrFormat("%s%s", oldName, ":CY"); + const std::string& oldName = state->mName; + state->mName = llformat("%s%s", oldName.c_str(), ":CY"); } allComplete = false; LL_DEBUGS("AOEngine") << "state " << state->mName << " still has animations to link." << LL_ENDL;