diff options
author | Jonathan Yap <none@none> | 2011-04-16 09:21:24 -0400 |
---|---|---|
committer | Jonathan Yap <none@none> | 2011-04-16 09:21:24 -0400 |
commit | 8c797002cf3900114693786b8816daec6e651680 (patch) | |
tree | 9cba5708dc84e6f4fd3b6524382871fa9c0b66da /indra | |
parent | bdd8adf5bb2df3da06610575706088507349b605 (diff) |
STORM-1128 GCC fixes: formatting changes, moved compare routine back to top
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/newview/llfloaterworldmap.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index a520a848a4..3e5842e5f0 100755 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -85,6 +85,16 @@ static const F32 MAP_ZOOM_TIME = 0.2f; // Currently (01/26/09), this value allows the whole grid to be visible in a 1024x1024 window. static const S32 MAX_VISIBLE_REGIONS = 512; +// It would be more logical to have this inside the method where it is used but to compile under gcc this +// struct has to be here. +struct SortRegionNames +{ + inline bool operator ()(const std::pair <U64, LLSimInfo*>& _left, const std::pair <U64, LLSimInfo*>& _right) + { + return(LLStringUtil::compareInsensitive(_left.second->getName(),_right.second->getName()) < 0); + } +}; + enum EPanDirection { PAN_UP, @@ -1486,18 +1496,10 @@ void LLFloaterWorldMap::updateSims(bool found_null_sim) S32 num_results = 0; - 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::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()); - for (std::vector<std::pair <U64, LLSimInfo*>>::const_iterator it = sim_info_vec.begin(); it != sim_info_vec.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(); |