From df242c1d46557cb50f0add28fdc275b5e6977141 Mon Sep 17 00:00:00 2001 From: Nicky Dasmijn Date: Mon, 20 Jul 2020 12:15:54 +0200 Subject: [PATCH] Remove return "refenceres to temporary" and instead return a copy. --- indra/newview/rlvenvironment.cpp | 4 ++-- indra/newview/rlvenvironment.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/newview/rlvenvironment.cpp b/indra/newview/rlvenvironment.cpp index 315b855a1f..c8ca144bbf 100644 --- a/indra/newview/rlvenvironment.cpp +++ b/indra/newview/rlvenvironment.cpp @@ -558,7 +558,7 @@ ERlvCmdRet RlvEnvironment::handleSetFn(const std::string& strRlvOption, const st } template<> -std::string RlvEnvironment::handleLegacyGetFn(const std::function& getFn, U32 idxComponent) +std::string RlvEnvironment::handleLegacyGetFn(const std::function& getFn, U32 idxComponent) { if (idxComponent > 2) return LLStringUtil::null; @@ -566,7 +566,7 @@ std::string RlvEnvironment::handleLegacyGetFn(const std::function -std::string RlvEnvironment::handleLegacyGetFn(const std::function& getFn, U32 idxComponent) +std::string RlvEnvironment::handleLegacyGetFn(const std::function& getFn, U32 idxComponent) { if ( (idxComponent >= VRED) && (idxComponent <= VBLUE) ) { diff --git a/indra/newview/rlvenvironment.h b/indra/newview/rlvenvironment.h index 846b6e2899..8daf12f97d 100644 --- a/indra/newview/rlvenvironment.h +++ b/indra/newview/rlvenvironment.h @@ -50,7 +50,7 @@ protected: // Command handling helpers template std::string handleGetFn(const std::function& fn); template ERlvCmdRet handleSetFn(const std::string& strRlvOption, const std::function& fn); - template std::string handleLegacyGetFn(const std::function& getFn, U32 idxComponent); + template std::string handleLegacyGetFn(const std::function< T (LLSettingsSky::ptr_t)>& getFn, U32 idxComponent); template ERlvCmdRet handleLegacySetFn(float optionValue, T value, const std::function& setFn, U32 idxComponent); /*