From 84ca1a3c7a0bbf44acf8d6f3fd1ca9b5167f263d Mon Sep 17 00:00:00 2001
From: Nicky <nicky.dasmijn@gmail.com>
Date: Sat, 12 Feb 2022 18:47:31 +0100
Subject: [PATCH] Do not bit blast 0 into a non POD struct to zero it, rather
 use the default constructor. There is a few peculiar differences in default
 member initializationn namely: gamma > 1.0f; sun_norm > 0.0f, 1.0f, 0.0f,
 1.0f; cloud_shadow > 1.0f; dome_radius > 1.0f; dome_offset > 1.0f Which
 probably made the original memset produce the wrong result anyway as it
 differs from the value the LLVOSky set (the default ctor of AtmosphericsVars)
 vs what the memset would produce in case of a force update (all 0s).

---
 indra/newview/llvosky.cpp | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp
index 878d7287ede..8232d47808a 100644
--- a/indra/newview/llvosky.cpp
+++ b/indra/newview/llvosky.cpp
@@ -680,9 +680,7 @@ void LLVOSky::idleUpdate(LLAgent &agent, const F64 &time)
 void LLVOSky::forceSkyUpdate()
 {
     mForceUpdate = TRUE;
-
-    memset(&m_lastAtmosphericsVars, 0x00, sizeof(AtmosphericsVars));
-
+    m_lastAtmosphericsVars = {};
     mCubeMapUpdateStage = -1;
 }
 
-- 
GitLab