From 43c9b7075c706781d002e26d7dd2b0065029143f Mon Sep 17 00:00:00 2001 From: Rye Mutt <rye@alchemyviewer.org> Date: Fri, 3 Jul 2020 14:14:43 -0400 Subject: [PATCH] Small opts --- indra/llcommon/llcallstack.cpp | 4 ++-- indra/llrender/llfontgl.cpp | 2 +- indra/llui/llfloaterreg.cpp | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/indra/llcommon/llcallstack.cpp b/indra/llcommon/llcallstack.cpp index 8db291eed18..a9ccbdc6093 100644 --- a/indra/llcommon/llcallstack.cpp +++ b/indra/llcommon/llcallstack.cpp @@ -171,9 +171,9 @@ void LLContextStrings::output(std::ostream& os) { const std::map<std::string,S32>& strings = LLThreadLocalSingletonPointer<LLContextStrings>::getInstance()->m_contextStrings; - for (std::map<std::string,S32>::const_iterator it = strings.begin(); it!=strings.end(); ++it) + for (const auto& string_pair : strings) { - os << it->first << "[" << it->second << "]" << "\n"; + os << string_pair.first << "[" << string_pair.second << "]" << "\n"; } } diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index 86a4c35e6de..ca9f5df8ab3 100644 --- a/indra/llrender/llfontgl.cpp +++ b/indra/llrender/llfontgl.cpp @@ -91,7 +91,7 @@ void LLFontGL::destroyGL() BOOL LLFontGL::loadFace(const std::string& filename, F32 point_size, F32 vert_dpi, F32 horz_dpi, S32 components, BOOL is_fallback, S32 face_n) { - if(mFontFreetype == reinterpret_cast<LLFontFreetype*>(NULL)) + if(mFontFreetype.isNull()) { mFontFreetype = new LLFontFreetype; } diff --git a/indra/llui/llfloaterreg.cpp b/indra/llui/llfloaterreg.cpp index b7dea943976..07062bd8f17 100644 --- a/indra/llui/llfloaterreg.cpp +++ b/indra/llui/llfloaterreg.cpp @@ -352,9 +352,8 @@ void LLFloaterReg::restoreVisibleInstances() for (instance_map_t::iterator iter = sInstanceMap.begin(); iter != sInstanceMap.end(); ++iter) { instance_list_t& list = iter->second; - for (instance_list_t::iterator iter = list.begin(); iter != list.end(); ++iter) + for (LLFloater* floater : list) { - LLFloater* floater = *iter; floater->popVisible(); } } -- GitLab