diff options
author | Rye Cogtail <rye@lindenlab.com> | 2024-09-30 23:17:59 -0400 |
---|---|---|
committer | Rye Cogtail <rye@lindenlab.com> | 2024-09-30 23:17:59 -0400 |
commit | e22af7cef9868e90f09930f2bffb457d79ac2d23 (patch) | |
tree | 3a5f484caa7e7031cf66e3fc4462630902437694 /indra/newview/llgltfmateriallist.cpp | |
parent | 5112aa396db2b3eac15970f65b9c5fb149fd8ce1 (diff) |
Fix deprecated strstream usage with boost::iostream::array_source
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())) |