diff options
author | Ansariel Hiller <Ansariel@users.noreply.github.com> | 2024-09-09 12:02:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-09 13:02:34 +0300 |
commit | d91d39fa0f7f4f204d6fb7ff66b9817e498dbd61 (patch) | |
tree | 467806f61646cd62b195143cb89f384a472e34bf /indra/newview | |
parent | 2f692fbac36117e1b3c5f2ec214fd188c7e73da7 (diff) |
Changes towards C++20 compatibility (#2520)
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/lldeferredsounds.cpp | 2 | ||||
-rw-r--r-- | indra/newview/lldeferredsounds.h | 3 | ||||
-rw-r--r-- | indra/newview/lldrawpoolalpha.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llspatialpartition.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llspatialpartition.h | 2 | ||||
-rw-r--r-- | indra/newview/llviewertexteditor.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llvograss.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llvopartgroup.cpp | 2 |
8 files changed, 8 insertions, 11 deletions
diff --git a/indra/newview/lldeferredsounds.cpp b/indra/newview/lldeferredsounds.cpp index 8b7c399af1..44f51545dc 100644 --- a/indra/newview/lldeferredsounds.cpp +++ b/indra/newview/lldeferredsounds.cpp @@ -29,8 +29,6 @@ #include "lldeferredsounds.h" -#include "llaudioengine.h" - void LLDeferredSounds::deferSound(SoundData& sound) { soundVector.push_back(sound); diff --git a/indra/newview/lldeferredsounds.h b/indra/newview/lldeferredsounds.h index e586226184..9f3425fc66 100644 --- a/indra/newview/lldeferredsounds.h +++ b/indra/newview/lldeferredsounds.h @@ -28,8 +28,7 @@ #define LL_LLDEFERREDSOUNDS_H #include "llsingleton.h" - -struct SoundData; +#include "llaudioengine.h" class LLDeferredSounds : public LLSingleton<LLDeferredSounds> { diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp index b4d14e22f3..87b6ce6cb3 100644 --- a/indra/newview/lldrawpoolalpha.cpp +++ b/indra/newview/lldrawpoolalpha.cpp @@ -757,7 +757,7 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, bool depth_only, bool rigged) if (current_shader) { - current_shader->uniform4f(LLShaderMgr::SPECULAR_COLOR, spec_color.mV[0], spec_color.mV[1], spec_color.mV[2], spec_color.mV[3]); + current_shader->uniform4f(LLShaderMgr::SPECULAR_COLOR, spec_color.mV[VRED], spec_color.mV[VGREEN], spec_color.mV[VBLUE], spec_color.mV[VALPHA]); current_shader->uniform1f(LLShaderMgr::ENVIRONMENT_INTENSITY, env_intensity); current_shader->uniform1f(LLShaderMgr::EMISSIVE_BRIGHTNESS, brightness); } diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index e517d009f5..a1a67c319c 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -300,7 +300,7 @@ bool LLSpatialGroup::addObject(LLDrawable *drawablep) } { drawablep->setGroup(this); - setState(OBJECT_DIRTY | GEOM_DIRTY); + setState(static_cast<U32>(OBJECT_DIRTY) | static_cast<U32>(GEOM_DIRTY)); setOcclusionState(LLSpatialGroup::DISCARD_QUERY, LLSpatialGroup::STATE_MODE_ALL_CAMERAS); gPipeline.markRebuild(this); if (drawablep->isSpatialBridge()) @@ -730,7 +730,7 @@ bool LLSpatialGroup::changeLOD() { LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL; - if (hasState(ALPHA_DIRTY | OBJECT_DIRTY)) + if (hasState(static_cast<U32>(ALPHA_DIRTY) | static_cast<U32>(OBJECT_DIRTY))) { //a rebuild is going to happen, update distance and LoD return true; diff --git a/indra/newview/llspatialpartition.h b/indra/newview/llspatialpartition.h index c074d6a89a..3aaa3d60e8 100644 --- a/indra/newview/llspatialpartition.h +++ b/indra/newview/llspatialpartition.h @@ -47,7 +47,7 @@ #include <unordered_map> #define SG_STATE_INHERIT_MASK (OCCLUDED) -#define SG_INITIAL_STATE_MASK (DIRTY | GEOM_DIRTY) +#define SG_INITIAL_STATE_MASK (static_cast<U32>(DIRTY) | static_cast<U32>(GEOM_DIRTY)) class LLViewerOctreePartition; class LLSpatialPartition; diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index 14228b469f..5793a28b80 100644 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -503,7 +503,7 @@ S32 LLEmbeddedItems::getIndexFromEmbeddedChar(llwchar wch) } else { - LL_WARNS() << "Embedded char " << wch << " not found, using 0" << LL_ENDL; + LL_WARNS() << "Embedded char " << (int)wch << " not found, using 0" << LL_ENDL; return 0; } } diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp index 6903af2619..67adcbb244 100644 --- a/indra/newview/llvograss.cpp +++ b/indra/newview/llvograss.cpp @@ -596,7 +596,7 @@ U32 LLVOGrass::getPartitionType() const } LLGrassPartition::LLGrassPartition(LLViewerRegion* regionp) -: LLSpatialPartition(LLDrawPoolAlpha::VERTEX_DATA_MASK | LLVertexBuffer::MAP_TEXTURE_INDEX, true, regionp) +: LLSpatialPartition(static_cast<U32>(LLDrawPoolAlpha::VERTEX_DATA_MASK) | static_cast<U32>(LLVertexBuffer::MAP_TEXTURE_INDEX), true, regionp) { mDrawableType = LLPipeline::RENDER_TYPE_GRASS; mPartitionType = LLViewerRegion::PARTITION_GRASS; diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp index 81f16cf8cb..8f792c1042 100644 --- a/indra/newview/llvopartgroup.cpp +++ b/indra/newview/llvopartgroup.cpp @@ -702,7 +702,7 @@ U32 LLVOPartGroup::getPartitionType() const } LLParticlePartition::LLParticlePartition(LLViewerRegion* regionp) -: LLSpatialPartition(LLDrawPoolAlpha::VERTEX_DATA_MASK | LLVertexBuffer::MAP_TEXTURE_INDEX, true, regionp) +: LLSpatialPartition(static_cast<U32>(LLDrawPoolAlpha::VERTEX_DATA_MASK) | static_cast<U32>(LLVertexBuffer::MAP_TEXTURE_INDEX), true, regionp) { mRenderPass = LLRenderPass::PASS_ALPHA; mDrawableType = LLPipeline::RENDER_TYPE_PARTICLES; |