Skip to content
Snippets Groups Projects
Commit fa42141e authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Use emplace for in-place value construction

parent 230cba1b
No related branches found
No related tags found
No related merge requests found
......@@ -85,7 +85,7 @@ BOOL LLDriverParamInfo::parseXml(LLXmlTreeNode* node)
// Push these on the front of the deque, so that we can construct
// them in order later (faster)
mDrivenInfoList.push_front( LLDrivenEntryInfo( driven_id, min1, max1, max2, min2 ) );
mDrivenInfoList.emplace_front( LLDrivenEntryInfo( driven_id, min1, max1, max2, min2 ) );
}
else
{
......@@ -500,7 +500,7 @@ BOOL LLDriverParam::linkDrivenParams(visual_param_mapper mapper, BOOL only_cross
bool push = param && (!only_cross_params || param->getCrossWearable());
if (push)
{
mDriven.push_back(LLDrivenEntry( param, driven_info ));
mDriven.emplace_back(LLDrivenEntry( param, driven_info ));
}
else
{
......
......@@ -303,7 +303,7 @@ BOOL LLPolyMorphTargetInfo::parseXml(LLXmlTreeNode* node)
static LLStdStringHandle pos_string = LLXmlTree::addAttributeString("pos");
child_node->getFastAttributeVector3(pos_string, pos);
mVolumeInfoList.push_back(LLPolyVolumeMorphInfo(volume_name,scale,pos));
mVolumeInfoList.emplace_back(LLPolyVolumeMorphInfo(volume_name,scale,pos));
}
}
}
......@@ -369,7 +369,7 @@ BOOL LLPolyMorphTarget::setInfo(LLPolyMorphTargetInfo* info)
{
if (avatarp->mCollisionVolumes[i].getName() == volume_info->mName)
{
mVolumeMorphs.push_back(
mVolumeMorphs.emplace_back(
LLPolyVolumeMorph(&avatarp->mCollisionVolumes[i],
volume_info->mScale,
volume_info->mPos));
......
......@@ -90,7 +90,7 @@ BOOL LLPolySkeletalDistortionInfo::parseXml(LLXmlTreeNode* node)
{
haspos = TRUE;
}
mBoneInfoList.push_back(LLPolySkeletalBoneInfo(name, scale, pos, haspos));
mBoneInfoList.emplace_back(LLPolySkeletalBoneInfo(name, scale, pos, haspos));
}
else
{
......
......@@ -763,7 +763,7 @@ BOOL LLTexLayerInfo::parseXml(LLXmlTreeNode* node)
BOOL invert = FALSE;
static LLStdStringHandle invert_string = LLXmlTree::addAttributeString("invert");
maskNode->getFastAttributeBOOL(invert_string, invert);
mMorphNameList.push_back(std::pair<std::string,BOOL>(morph_name,invert));
mMorphNameList.emplace_back(std::pair<std::string,BOOL>(morph_name,invert));
}
}
......
......@@ -112,7 +112,7 @@ void LLAllocatorHeapProfile::parse(std::string const & prof_text)
{
++j; // skip the '@'
mLines.push_back(line(live_count, live_size, tot_count, tot_size));
mLines.emplace_back(line(live_count, live_size, tot_count, tot_size));
line & current_line = mLines.back();
for(; j != line_elems.end(); ++j)
......
......@@ -441,7 +441,7 @@ namespace
void ImplMap::insert(const LLSD::String& k, const LLSD& v)
{
mData.insert(DataMap::value_type(k, v));
mData.emplace(DataMap::value_type(k, v));
}
void ImplMap::erase(const LLSD::String& k)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment