Remove return "refenceres to temporary" and instead return a copy.
parent
a382089940
commit
df242c1d46
|
|
@ -558,7 +558,7 @@ ERlvCmdRet RlvEnvironment::handleSetFn(const std::string& strRlvOption, const st
|
|||
}
|
||||
|
||||
template<>
|
||||
std::string RlvEnvironment::handleLegacyGetFn<LLVector2>(const std::function<const LLVector2& (LLSettingsSkyPtr_t)>& getFn, U32 idxComponent)
|
||||
std::string RlvEnvironment::handleLegacyGetFn<LLVector2>(const std::function<LLVector2 (LLSettingsSkyPtr_t)>& getFn, U32 idxComponent)
|
||||
{
|
||||
if (idxComponent > 2)
|
||||
return LLStringUtil::null;
|
||||
|
|
@ -566,7 +566,7 @@ std::string RlvEnvironment::handleLegacyGetFn<LLVector2>(const std::function<con
|
|||
}
|
||||
|
||||
template<>
|
||||
std::string RlvEnvironment::handleLegacyGetFn<LLColor3>(const std::function<const LLColor3& (LLSettingsSkyPtr_t)>& getFn, U32 idxComponent)
|
||||
std::string RlvEnvironment::handleLegacyGetFn<LLColor3>(const std::function<LLColor3 (LLSettingsSkyPtr_t)>& getFn, U32 idxComponent)
|
||||
{
|
||||
if ( (idxComponent >= VRED) && (idxComponent <= VBLUE) )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ protected:
|
|||
// Command handling helpers
|
||||
template<typename T> std::string handleGetFn(const std::function<T(LLSettingsSky::ptr_t)>& fn);
|
||||
template<typename T> ERlvCmdRet handleSetFn(const std::string& strRlvOption, const std::function<void(LLSettingsSky::ptr_t, const T&)>& fn);
|
||||
template<typename T> std::string handleLegacyGetFn(const std::function<const T& (LLSettingsSky::ptr_t)>& getFn, U32 idxComponent);
|
||||
template<typename T> std::string handleLegacyGetFn(const std::function< T (LLSettingsSky::ptr_t)>& getFn, U32 idxComponent);
|
||||
template<typename T> ERlvCmdRet handleLegacySetFn(float optionValue, T value, const std::function<void(LLSettingsSky::ptr_t, const T&)>& setFn, U32 idxComponent);
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue