Fix deprecation warnings under C++20 on MSVC

master
Rye 2025-02-11 05:03:13 -05:00
parent ded9471355
commit 9b060f7fcc
5 changed files with 14 additions and 11 deletions

View File

@ -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(

View File

@ -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)
{

View File

@ -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]);

View File

@ -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()))

View File

@ -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()))