From 2bfada29a983b0a1d55e25c9efb9a998d0188d0e Mon Sep 17 00:00:00 2001 From: Rye Mutt <rye@alchemyviewer.org> Date: Tue, 2 Nov 2021 17:30:27 -0400 Subject: [PATCH] A few small opts --- indra/llprimitive/llmaterial.cpp | 2 +- indra/llprimitive/llmaterial.h | 2 +- indra/llprimitive/lltextureentry.h | 2 +- indra/newview/pipeline.cpp | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/indra/llprimitive/llmaterial.cpp b/indra/llprimitive/llmaterial.cpp index a219ac14501..90e544dea1c 100644 --- a/indra/llprimitive/llmaterial.cpp +++ b/indra/llprimitive/llmaterial.cpp @@ -281,7 +281,7 @@ void LLMaterial::setSpecularRotation(F32 rot) mSpecularRotation = rot; } -const LLColor4U LLMaterial::getSpecularLightColor() const +const LLColor4U& LLMaterial::getSpecularLightColor() const { return mSpecularLightColor; } diff --git a/indra/llprimitive/llmaterial.h b/indra/llprimitive/llmaterial.h index 83c86c81d55..c5848ea535c 100644 --- a/indra/llprimitive/llmaterial.h +++ b/indra/llprimitive/llmaterial.h @@ -109,7 +109,7 @@ class LLMaterial final : public LLRefCount F32 getSpecularRotation() const; void setSpecularRotation(F32 rot); - const LLColor4U getSpecularLightColor() const; + const LLColor4U& getSpecularLightColor() const; void setSpecularLightColor(const LLColor4U& color); U8 getSpecularLightExponent() const; void setSpecularLightExponent(U8 exponent); diff --git a/indra/llprimitive/lltextureentry.h b/indra/llprimitive/lltextureentry.h index d8528b2b7fe..aaa06a3bf69 100644 --- a/indra/llprimitive/lltextureentry.h +++ b/indra/llprimitive/lltextureentry.h @@ -162,7 +162,7 @@ class LLTextureEntry final U8 getMediaTexGen() const { return mMediaFlags; } F32 getGlow() const { return mGlow; } const LLMaterialID& getMaterialID() const { return mMaterialID; }; - const LLMaterialPtr getMaterialParams() const { return mMaterial; }; + const LLMaterialPtr& getMaterialParams() const { return mMaterial; }; // *NOTE: it is possible for hasMedia() to return true, but getMediaData() to return NULL. // CONVERSELY, it is also possible for hasMedia() to return false, but getMediaData() diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 0b1fec4c579..2c08cee7ba8 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -6304,9 +6304,9 @@ void LLPipeline::calcNearbyLights(LLCamera& camera) fade -= LIGHT_FADE_TIME; } } - cur_nearby_lights.insert(Light(drawable, dist, fade)); + cur_nearby_lights.emplace(drawable, dist, fade); } - mNearbyLights = cur_nearby_lights; + mNearbyLights = std::move(cur_nearby_lights); // FIND NEW LIGHTS THAT ARE IN RANGE light_set_t new_nearby_lights; -- GitLab