summaryrefslogtreecommitdiff
path: root/indra/llcommon/llinitparam.cpp
diff options
context:
space:
mode:
authorFawrsk <fawrsk@gmail.com>2023-01-09 19:19:12 -0400
committerFawrsk <fawrsk@gmail.com>2023-01-09 19:19:12 -0400
commit8767e6995b0c9b9ed23e07f63d290a1da8c70f17 (patch)
tree26c8c15b117bc183386af1ee6e8b6617708aeba7 /indra/llcommon/llinitparam.cpp
parent9e743c99fb69db5694c388ae33656c62e3fa0b8e (diff)
Eliminate needless copies
Diffstat (limited to 'indra/llcommon/llinitparam.cpp')
-rw-r--r--indra/llcommon/llinitparam.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/indra/llcommon/llinitparam.cpp b/indra/llcommon/llinitparam.cpp
index 12765bb1dc..9d3394b4f7 100644
--- a/indra/llcommon/llinitparam.cpp
+++ b/indra/llcommon/llinitparam.cpp
@@ -207,7 +207,7 @@ namespace LLInitParam
if (!mValidated)
{
const BlockDescriptor& block_data = mostDerivedBlockDescriptor();
- for (const BlockDescriptor::param_validation_list_t::value_type pair : block_data.mValidationList)
+ for (const BlockDescriptor::param_validation_list_t::value_type& pair : block_data.mValidationList)
{
const Param* param = getParamFromHandle(pair.first);
if (!pair.second(param))
@@ -235,7 +235,7 @@ namespace LLInitParam
// unnamed param is like LLView::Params::rect - implicit
const BlockDescriptor& block_data = mostDerivedBlockDescriptor();
- for (const ParamDescriptorPtr ptr : block_data.mUnnamedParams)
+ for (const ParamDescriptorPtr& ptr : block_data.mUnnamedParams)
{
param_handle_t param_handle = ptr->mParamHandle;
const Param* param = getParamFromHandle(param_handle);
@@ -247,7 +247,7 @@ namespace LLInitParam
}
}
- for (const BlockDescriptor::param_map_t::value_type pair : block_data.mNamedParams)
+ for (const BlockDescriptor::param_map_t::value_type& pair : block_data.mNamedParams)
{
param_handle_t param_handle = pair.second->mParamHandle;
const Param* param = getParamFromHandle(param_handle);
@@ -257,7 +257,7 @@ namespace LLInitParam
// Ensure this param has not already been serialized
// Prevents <rect> from being serialized as its own tag.
bool duplicate = false;
- for (const ParamDescriptorPtr ptr : block_data.mUnnamedParams)
+ for (const ParamDescriptorPtr& ptr : block_data.mUnnamedParams)
{
if (param_handle == ptr->mParamHandle)
{
@@ -294,7 +294,7 @@ namespace LLInitParam
// unnamed param is like LLView::Params::rect - implicit
const BlockDescriptor& block_data = mostDerivedBlockDescriptor();
- for (const ParamDescriptorPtr ptr : block_data.mUnnamedParams)
+ for (const ParamDescriptorPtr& ptr : block_data.mUnnamedParams)
{
param_handle_t param_handle = ptr->mParamHandle;
const Param* param = getParamFromHandle(param_handle);
@@ -307,7 +307,7 @@ namespace LLInitParam
}
}
- for(const BlockDescriptor::param_map_t::value_type pair : block_data.mNamedParams)
+ for(const BlockDescriptor::param_map_t::value_type& pair : block_data.mNamedParams)
{
param_handle_t param_handle = pair.second->mParamHandle;
const Param* param = getParamFromHandle(param_handle);
@@ -370,7 +370,7 @@ namespace LLInitParam
}
// try to parse unnamed parameters, in declaration order
- for (ParamDescriptorPtr ptr : block_data.mUnnamedParams)
+ for (ParamDescriptorPtr& ptr : block_data.mUnnamedParams)
{
Param* paramp = getParamFromHandle(ptr->mParamHandle);
ParamDescriptor::deserialize_func_t deserialize_func = ptr->mDeserializeFunc;
@@ -439,7 +439,7 @@ namespace LLInitParam
{
param_handle_t handle = getHandleFromParam(&param);
BlockDescriptor& descriptor = mostDerivedBlockDescriptor();
- for (ParamDescriptorPtr ptr : descriptor.mAllParams)
+ for (ParamDescriptorPtr& ptr : descriptor.mAllParams)
{
if (ptr->mParamHandle == handle) return ptr;
}
@@ -451,7 +451,7 @@ namespace LLInitParam
bool BaseBlock::mergeBlock(BlockDescriptor& block_data, const BaseBlock& other, bool overwrite)
{
bool some_param_changed = false;
- for (const ParamDescriptorPtr ptr : block_data.mAllParams)
+ for (const ParamDescriptorPtr& ptr : block_data.mAllParams)
{
const Param* other_paramp = other.getParamFromHandle(ptr->mParamHandle);
ParamDescriptor::merge_func_t merge_func = ptr->mMergeFunc;