From b47d3c3ef543681c377f18b2dc4c43146adc745a Mon Sep 17 00:00:00 2001 From: minerjr Date: Sat, 22 Mar 2025 19:15:03 -0300 Subject: [PATCH] Fix float typos There were five files which had float values assigned which were missing the "f" on them so they are in fact a doubles. These get treated as errors when you change the floating point compile options from Fast to Precise or Strict as the fast path turns them from doubles to floats and suppresses the warnings. --- indra/newview/fsmaniprotatejoint.h | 4 ++-- indra/newview/fsposingmotion.h | 2 +- indra/newview/llviewermedia.cpp | 2 +- indra/newview/llviewerstatsrecorder.cpp | 2 +- indra/newview/llvoicewebrtc.cpp | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/indra/newview/fsmaniprotatejoint.h b/indra/newview/fsmaniprotatejoint.h index 4feb5e2600..5a8a05a03c 100644 --- a/indra/newview/fsmaniprotatejoint.h +++ b/indra/newview/fsmaniprotatejoint.h @@ -132,8 +132,8 @@ private: void renderActiveRing( F32 radius, F32 width, const LLColor4& front_color, const LLColor4& back_color); void renderManipulatorRings(const LLVector3& center, const LLQuaternion& finalAlignment); - void renderCenterCircle(const F32 radius, const LLColor4& normal_color = LLColor4(0.7f,0.7,0.7f,0.2), const LLColor4& highlight_color = LLColor4(0.8f,0.8f,0.8f,0.3)); - void renderCenterSphere(const F32 radius, const LLColor4& normal_color = LLColor4(0.7f,0.7,0.7f,0.2), const LLColor4& highlight_color = LLColor4(0.8f,0.8f,0.8f,0.3)); + void renderCenterCircle(const F32 radius, const LLColor4& normal_color = LLColor4(0.7f,0.7f,0.7f,0.2f), const LLColor4& highlight_color = LLColor4(0.8f,0.8f,0.8f,0.3f)); // add missing f for float + void renderCenterSphere(const F32 radius, const LLColor4& normal_color = LLColor4(0.7f,0.7f,0.7f,0.2f), const LLColor4& highlight_color = LLColor4(0.8f,0.8f,0.8f,0.3f)); // add missing f for float void renderRingPass(const RingRenderParams& params, float radius, float width, int pass); void renderAxes(const LLVector3& center, F32 size, const LLQuaternion& rotation); diff --git a/indra/newview/fsposingmotion.h b/indra/newview/fsposingmotion.h index 3b9d3a7a0d..71c7d41063 100644 --- a/indra/newview/fsposingmotion.h +++ b/indra/newview/fsposingmotion.h @@ -133,7 +133,7 @@ private: /// This takes advantage of how the actual vector migrates to equality with the target vector. /// Certain physics settings (bouncing whatnots) account for some longer term work, but as this is applied per joint, it tends to reduce a lot of work. /// - const F32 closeEnough = 1e-6; + const F32 closeEnough = 1e-6f; // add missing f for float /// /// The kind of joint state this animation is concerned with changing. diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index d0e7e7c071..28896e3cf5 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -695,7 +695,7 @@ void LLViewerMedia::updateMedia(void *dummy_arg) static LLCachedControl max_instances(gSavedSettings, "PluginInstancesTotal", 8); static LLCachedControl max_normal(gSavedSettings, "PluginInstancesNormal", 2); static LLCachedControl max_low(gSavedSettings, "PluginInstancesLow", 4); - static LLCachedControl max_cpu(gSavedSettings, "PluginInstancesCPULimit", 0.9); + static LLCachedControl max_cpu(gSavedSettings, "PluginInstancesCPULimit", 0.9f); // add missing f for float // Setting max_cpu to 0.0 disables CPU usage checking. bool check_cpu_usage = (max_cpu != 0.0f); diff --git a/indra/newview/llviewerstatsrecorder.cpp b/indra/newview/llviewerstatsrecorder.cpp index 58065ecce5..4c0f120326 100644 --- a/indra/newview/llviewerstatsrecorder.cpp +++ b/indra/newview/llviewerstatsrecorder.cpp @@ -41,7 +41,7 @@ LLViewerStatsRecorder::LLViewerStatsRecorder() : mLastSnapshotTime(0.0), mEnableStatsRecording(false), mEnableStatsLogging(false), - mInterval(0.2), + mInterval(0.2f), // add missing f for float mMaxDuration(300.f), mSkipSaveIfZeros(false) { diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp index c3245b00f4..782c0c89fc 100644 --- a/indra/newview/llvoicewebrtc.cpp +++ b/indra/newview/llvoicewebrtc.cpp @@ -85,7 +85,7 @@ namespace { const F32 VOLUME_SCALE_WEBRTC = 0.01f; const F32 LEVEL_SCALE_WEBRTC = 0.008f; - const F32 SPEAKING_AUDIO_LEVEL = 0.30; + const F32 SPEAKING_AUDIO_LEVEL = 0.30f; // add missing f for float const uint32_t PEER_GAIN_CONVERSION_FACTOR = 220;