summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorRye <rye@lindenlab.com>2025-02-11 05:03:13 -0500
committerRye <rye@lindenlab.com>2025-02-11 05:04:11 -0500
commit9b060f7fccfed39a7c24dafaa4c66da0cfc4984d (patch)
tree55e79dd9afc660307dee2f0526e9328accd1867e /indra
parentded94713550ef10642dbd3ca77660023e9e15fcc (diff)
Fix deprecation warnings under C++20 on MSVC
Diffstat (limited to 'indra')
-rw-r--r--indra/cmake/00-Common.cmake2
-rw-r--r--indra/llcommon/llsys.cpp5
-rw-r--r--indra/newview/llface.cpp6
-rw-r--r--indra/newview/llgltfmateriallist.cpp7
-rw-r--r--indra/newview/llmaterialeditor.cpp5
5 files changed, 14 insertions, 11 deletions
diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake
index 167964fa16..ad88107719 100644
--- a/indra/cmake/00-Common.cmake
+++ b/indra/cmake/00-Common.cmake
@@ -73,6 +73,8 @@ if (WINDOWS)
NOMINMAX
# DOM_DYNAMIC # For shared library colladadom
_CRT_SECURE_NO_WARNINGS # Allow use of sprintf etc
+ _CRT_NONSTDC_NO_DEPRECATE # Allow use of sprintf etc
+ _CRT_OBSOLETE_NO_WARNINGS
_WINSOCK_DEPRECATED_NO_WARNINGS # Disable deprecated WinSock API warnings
)
add_compile_options(
diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp
index 3f33ad61c5..b38b3725be 100644
--- a/indra/llcommon/llsys.cpp
+++ b/indra/llcommon/llsys.cpp
@@ -192,6 +192,9 @@ LLOSInfo::LLOSInfo() :
GetSystemInfo(&si); //if it fails get regular system info
//(Warning: If GetSystemInfo it may result in incorrect information in a WOW64 machine, if the kernel fails to load)
+#pragma warning(push)
+#pragma warning(disable : 4996) // ignore 'deprecated.' GetVersionEx is deprecated
+
// Try calling GetVersionEx using the OSVERSIONINFOEX structure.
OSVERSIONINFOEX osvi;
ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX));
@@ -210,6 +213,8 @@ LLOSInfo::LLOSInfo() :
}
}
+#pragma warning(pop)
+
S32 ubr = 0; // Windows 10 Update Build Revision, can be retrieved from a registry
if (mMajorVer == 10)
{
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 811aacb2ed..77a6e20b07 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -767,9 +767,6 @@ static void xform4a(LLVector4a &tex_coord, const LLVector4a& trans, const LLVect
// Texture transforms are done about the center of the face.
st.setAdd(tex_coord, trans);
- // Handle rotation
- LLVector4a rot_st;
-
// <s0 * cosAng, s0*-sinAng, s1*cosAng, s1*-sinAng>
LLVector4a s0;
s0.splat(st, 0);
@@ -842,7 +839,6 @@ bool LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f,
//VECTORIZE THIS
LLMatrix4a mat_vert;
mat_vert.loadu(mat_vert_in);
- LLVector4a new_extents[2];
llassert(less_than_max_mag(face.mExtents[0]));
llassert(less_than_max_mag(face.mExtents[1]));
@@ -2255,8 +2251,6 @@ bool LLFace::calcPixelArea(F32& cos_angle_to_view_dir, F32& radius)
if (joint)
{
- LLVector4a jointPos;
-
LLMatrix4a worldMat;
worldMat.loadu((F32*)&joint->getWorldMatrix().mMatrix[0][0]);
diff --git a/indra/newview/llgltfmateriallist.cpp b/indra/newview/llgltfmateriallist.cpp
index 25438eae5e..d7b088b56d 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>
@@ -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()))
diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp
index 1e3a328464..d58f5d5285 100644
--- a/indra/newview/llmaterialeditor.cpp
+++ b/indra/newview/llmaterialeditor.cpp
@@ -63,8 +63,9 @@
#include "tinygltf/tiny_gltf.h"
#include "lltinygltfhelper.h"
-#include <strstream>
+#include <boost/iostreams/device/array.hpp>
+#include <boost/iostreams/stream.hpp>
const std::string MATERIAL_BASE_COLOR_DEFAULT_NAME = "Base Color";
const std::string MATERIAL_NORMAL_DEFAULT_NAME = "Normal";
@@ -1245,7 +1246,7 @@ bool LLMaterialEditor::decodeAsset(const std::vector<char>& buffer)
{
LLSD asset;
- std::istrstream str(&buffer[0], 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()))