Skip to content
Snippets Groups Projects
Commit b608c193 authored by Drake Arconis's avatar Drake Arconis
Browse files

Random changes

parent cc497fda
Branches
Tags
No related merge requests found
...@@ -59,7 +59,7 @@ public: ...@@ -59,7 +59,7 @@ public:
bool add(ref_const_key_t key, ref_const_value_t value) bool add(ref_const_key_t key, ref_const_value_t value)
{ {
if (mMap.insert(std::make_pair(key, value)).second == false) if (mMap.emplace(key, value).second == false)
{ {
LL_WARNS() << "Tried to register " << key << " but it was already registered!" << LL_ENDL; LL_WARNS() << "Tried to register " << key << " but it was already registered!" << LL_ENDL;
return false; return false;
...@@ -91,7 +91,7 @@ public: ...@@ -91,7 +91,7 @@ public:
ptr_value_t getValue(ref_const_key_t key) ptr_value_t getValue(ref_const_key_t key)
{ {
typename registry_map_t::iterator found_it = mMap.find(key); typename registry_map_t::iterator found_it = mMap.find(key);
if (found_it != mMap.end()) if (found_it != mMap.cend())
{ {
return &(found_it->second); return &(found_it->second);
} }
......
...@@ -1061,7 +1061,7 @@ GLuint LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_lev ...@@ -1061,7 +1061,7 @@ GLuint LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_lev
if (ret) if (ret)
{ {
// Add shader file to map // Add shader file to map
mShaderObjects.insert(make_pair(filename, CachedShaderObject(ret, try_gpu_class, type, texture_index_channels, defines))); mShaderObjects.emplace(filename, CachedShaderObject(ret, try_gpu_class, type, texture_index_channels, defines));
shader_level = try_gpu_class; shader_level = try_gpu_class;
} }
else else
......
...@@ -286,7 +286,7 @@ void LLUIColorTable::setColor(const std::string& name, const LLColor4& color, st ...@@ -286,7 +286,7 @@ void LLUIColorTable::setColor(const std::string& name, const LLColor4& color, st
} }
else else
{ {
table.insert(string_color_map_t::value_type(name, color)); table.emplace(name, color);
} }
} }
......
...@@ -206,7 +206,7 @@ BOOL LLView::isPanel() const ...@@ -206,7 +206,7 @@ BOOL LLView::isPanel() const
void LLView::setToolTip(const LLStringExplicit& msg) void LLView::setToolTip(const LLStringExplicit& msg)
{ {
// <alchemy> // <alchemy>
if (msg.size()) if (!msg.empty())
{ {
mToolTipMsg = std::make_unique<char[]>(msg.size() + 1); mToolTipMsg = std::make_unique<char[]>(msg.size() + 1);
std::strncpy(mToolTipMsg.get(), msg.c_str(), msg.size() + 1); std::strncpy(mToolTipMsg.get(), msg.c_str(), msg.size() + 1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment