diff options
author | Jonathan Yap <none@none> | 2011-04-15 14:30:36 -0400 |
---|---|---|
committer | Jonathan Yap <none@none> | 2011-04-15 14:30:36 -0400 |
commit | bdd8adf5bb2df3da06610575706088507349b605 (patch) | |
tree | 57eb2034b32f76285b8414701e0bc6fb5c6c8375 | |
parent | efa26485dfa20d138cb654e27cb90e209dd1f395 (diff) |
STORM-1128 Code cleanup per codereview comments
-rwxr-xr-x | indra/newview/llfloaterworldmap.cpp | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index bf5f569e36..a520a848a4 100755 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -96,14 +96,6 @@ enum EPanDirection // Values in pixels per region static const F32 ZOOM_MAX = 128.f; -struct SortRegionNames -{ - inline bool operator ()(std::pair <U64, LLSimInfo*>& _left, std::pair <U64, LLSimInfo*>& _right) - { - return(LLStringUtil::compareInsensitive(_left.second->getName(),_right.second->getName()) < 0); - } -}; - //--------------------------------------------------------------------------- // Globals //--------------------------------------------------------------------------- @@ -1494,11 +1486,18 @@ void LLFloaterWorldMap::updateSims(bool found_null_sim) S32 num_results = 0; - std::vector<std::pair <U64, LLSimInfo*>> simInfoVec(LLWorldMap::getInstance()->getRegionMap().begin(), LLWorldMap::getInstance()->getRegionMap().end()); - std::sort(simInfoVec.begin(), simInfoVec.end(), SortRegionNames()); + struct SortRegionNames + { + inline bool operator ()(std::pair <U64, LLSimInfo*>& _left, std::pair <U64, LLSimInfo*>& _right) + { + return(LLStringUtil::compareInsensitive(_left.second->getName(),_right.second->getName()) < 0); + } + }; + + std::vector<std::pair <U64, LLSimInfo*>> sim_info_vec(LLWorldMap::getInstance()->getRegionMap().begin(), LLWorldMap::getInstance()->getRegionMap().end()); + std::sort(sim_info_vec.begin(), sim_info_vec.end(), SortRegionNames()); - std::vector<std::pair <U64, LLSimInfo*>>::const_iterator it; - for (it = simInfoVec.begin(); it != simInfoVec.end(); ++it) + for (std::vector<std::pair <U64, LLSimInfo*>>::const_iterator it = sim_info_vec.begin(); it != sim_info_vec.end(); ++it) { LLSimInfo* info = it->second; std::string sim_name_lower = info->getName(); |