diff options
Diffstat (limited to 'indra/newview/llgltfmateriallist.cpp')
-rw-r--r-- | indra/newview/llgltfmateriallist.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/indra/newview/llgltfmateriallist.cpp b/indra/newview/llgltfmateriallist.cpp index 25438eae5e..5e5e6425b8 100644 --- a/indra/newview/llgltfmateriallist.cpp +++ b/indra/newview/llgltfmateriallist.cpp @@ -45,7 +45,9 @@ #include "llworld.h" #include "tinygltf/tiny_gltf.h" -#include <strstream> + +#include <boost/iostreams/device/array.hpp> +#include <boost/iostreams/stream.hpp> #include <unordered_set> @@ -168,7 +170,7 @@ namespace void LLGLTFMaterialList::applyOverrideMessage(LLMessageSystem* msg, const std::string& data_in) { - std::istringstream str(data_in); + boost::iostreams::stream<boost::iostreams::array_source> str(data_in.data(), data_in.size()); LLSD data; @@ -539,8 +541,7 @@ void LLGLTFMaterialList::onAssetLoadComplete(const LLUUID& id, LLAssetType::ETyp LLSD asset; // read file into buffer - std::istrstream str(&buffer[0], static_cast<S32>(buffer.size())); - + boost::iostreams::stream<boost::iostreams::array_source> str(buffer.data(), buffer.size()); if (LLSDSerialize::deserialize(asset, str, buffer.size())) { if (asset.has("version") && LLGLTFMaterial::isAcceptedVersion(asset["version"].asString())) |