diff options
author | Nicky <nicky.dasmijn@gmail.com> | 2022-02-12 18:47:31 +0100 |
---|---|---|
committer | Nicky <nicky.dasmijn@gmail.com> | 2022-02-12 18:47:31 +0100 |
commit | 84ca1a3c7a0bbf44acf8d6f3fd1ca9b5167f263d (patch) | |
tree | 2b8e8edf858e34249395b17b0e553337970ba64d /indra/newview/llvosky.cpp | |
parent | af610f4ad8e33f9da8a4bf029bc4fea990e92afb (diff) |
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).
Diffstat (limited to 'indra/newview/llvosky.cpp')
-rw-r--r-- | indra/newview/llvosky.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index 878d7287ed..8232d47808 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; } |