summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicky <nicky.dasmijn@posteo.nl>2024-08-03 14:27:37 +0200
committerNicky <nicky.dasmijn@posteo.nl>2024-08-03 14:27:37 +0200
commitf480075e1ffbcc026843a3d14fd6533aad1e7126 (patch)
tree097229ec4c18418dfdc9d0b56aea2ccae5294879
parent6cd306e9bf3698551beb70ec6ddfde7f6cec12bd (diff)
Cast RAND_MAX into F32 to avoid any implicit casting
-rw-r--r--indra/newview/llvoicewebrtc.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp
index d18a32cb05..59158922d0 100644
--- a/indra/newview/llvoicewebrtc.cpp
+++ b/indra/newview/llvoicewebrtc.cpp
@@ -2096,7 +2096,7 @@ LLVoiceWebRTCConnection::LLVoiceWebRTCConnection(const LLUUID &regionID, const s
{
// retries wait a short period...randomize it so
// all clients don't try to reconnect at once.
- mRetryWaitSecs = (F32)((F32) rand() / (RAND_MAX)) + 0.5f;
+ mRetryWaitSecs = (F32)((F32) rand() / ((F32)RAND_MAX)) + 0.5f;
mWebRTCPeerConnectionInterface = llwebrtc::newPeerConnection();
mWebRTCPeerConnectionInterface->setSignalingObserver(this);
@@ -2678,7 +2678,7 @@ bool LLVoiceWebRTCConnection::connectionStateMachine()
case VOICE_STATE_SESSION_UP:
{
mRetryWaitPeriod = 0;
- mRetryWaitSecs = (F32)((F32) rand() / (RAND_MAX)) + 0.5f;
+ mRetryWaitSecs = (F32)((F32) rand() / ((F32)RAND_MAX)) + 0.5f;
// we'll stay here as long as the session remains up.
if (mShutDown)
@@ -2700,7 +2700,7 @@ bool LLVoiceWebRTCConnection::connectionStateMachine()
{
// back off the retry period, and do it by a small random
// bit so all clients don't reconnect at once.
- mRetryWaitSecs += (F32)((F32) rand() / (RAND_MAX)) + 0.5f;
+ mRetryWaitSecs += (F32)((F32) rand() / ((F32)RAND_MAX)) + 0.5f;
mRetryWaitPeriod = 0;
}
}