From b42f9d836b4c0f7fbd4bdae1734021e2a09fdbe8 Mon Sep 17 00:00:00 2001 From: Ansariel <ansariel.hiller@phoenixviewer.com> Date: Sat, 1 Jun 2024 15:49:26 +0200 Subject: Re-enable a lot of compiler warnings for MSVC and address the C4267 "possible loss of precision" warnings --- indra/llinventory/llsettingsdaycycle.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llinventory') diff --git a/indra/llinventory/llsettingsdaycycle.cpp b/indra/llinventory/llsettingsdaycycle.cpp index ef6a187d06..5950474311 100644 --- a/indra/llinventory/llsettingsdaycycle.cpp +++ b/indra/llinventory/llsettingsdaycycle.cpp @@ -462,7 +462,7 @@ namespace // Trim extra tracks. while (value.size() > LLSettingsDay::TRACK_MAX) { - value.erase(value.size() - 1); + value.erase(static_cast<LLSD::Integer>(value.size()) - 1); } S32 framecount(0); @@ -511,7 +511,7 @@ namespace } - int waterTracks = value[0].size(); + int waterTracks = static_cast<int>(value[0].size()); int skyTracks = framecount - waterTracks; if (waterTracks < 1) -- cgit v1.2.3 From c0fad3028fd55c2067ce6a0ae4382cffe1014284 Mon Sep 17 00:00:00 2001 From: Ansariel <ansariel.hiller@phoenixviewer.com> Date: Mon, 10 Jun 2024 16:42:43 +0200 Subject: Re-enable compiler warnings C4018, C4100, C4231 and C4506 --- indra/llinventory/llsettingsdaycycle.cpp | 8 ++++---- indra/llinventory/llsettingsdaycycle.h | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'indra/llinventory') diff --git a/indra/llinventory/llsettingsdaycycle.cpp b/indra/llinventory/llsettingsdaycycle.cpp index 5950474311..2ff1cc74c6 100644 --- a/indra/llinventory/llsettingsdaycycle.cpp +++ b/indra/llinventory/llsettingsdaycycle.cpp @@ -111,10 +111,10 @@ const LLSettingsDay::Seconds LLSettingsDay::MINIMUM_DAYOFFSET(0); const LLSettingsDay::Seconds LLSettingsDay::DEFAULT_DAYOFFSET(57600); // +16 hours == -8 hours (SLT time offset) const LLSettingsDay::Seconds LLSettingsDay::MAXIMUM_DAYOFFSET(86400); // 24 hours -const S32 LLSettingsDay::TRACK_WATER(0); // water track is 0 -const S32 LLSettingsDay::TRACK_GROUND_LEVEL(1); -const S32 LLSettingsDay::TRACK_MAX(5); // 5 tracks, 4 skys, 1 water -const S32 LLSettingsDay::FRAME_MAX(56); +const U32 LLSettingsDay::TRACK_WATER(0); // water track is 0 +const U32 LLSettingsDay::TRACK_GROUND_LEVEL(1); +const U32 LLSettingsDay::TRACK_MAX(5); // 5 tracks, 4 skys, 1 water +const U32 LLSettingsDay::FRAME_MAX(56); const F32 LLSettingsDay::DEFAULT_FRAME_SLOP_FACTOR(0.02501f); diff --git a/indra/llinventory/llsettingsdaycycle.h b/indra/llinventory/llsettingsdaycycle.h index 4a46eba6fe..917b0870f2 100644 --- a/indra/llinventory/llsettingsdaycycle.h +++ b/indra/llinventory/llsettingsdaycycle.h @@ -59,10 +59,10 @@ public: static const Seconds DEFAULT_DAYOFFSET; static const Seconds MAXIMUM_DAYOFFSET; - static const S32 TRACK_WATER; - static const S32 TRACK_GROUND_LEVEL; - static const S32 TRACK_MAX; - static const S32 FRAME_MAX; + static const U32 TRACK_WATER; + static const U32 TRACK_GROUND_LEVEL; + static const U32 TRACK_MAX; + static const U32 FRAME_MAX; static const F32 DEFAULT_FRAME_SLOP_FACTOR; -- cgit v1.2.3