From 8c797002cf3900114693786b8816daec6e651680 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Sat, 16 Apr 2011 09:21:24 -0400 Subject: STORM-1128 GCC fixes: formatting changes, moved compare routine back to top --- indra/newview/llfloaterworldmap.cpp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'indra') 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 & _left, const std::pair & _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 & _left, std::pair & _right) - { - return(LLStringUtil::compareInsensitive(_left.second->getName(),_right.second->getName()) < 0); - } - }; - - std::vector> sim_info_vec(LLWorldMap::getInstance()->getRegionMap().begin(), LLWorldMap::getInstance()->getRegionMap().end()); + std::vector > 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>::const_iterator it = sim_info_vec.begin(); it != sim_info_vec.end(); ++it) + for (std::vector >::const_iterator it = sim_info_vec.begin(); it != sim_info_vec.end(); ++it) { LLSimInfo* info = it->second; std::string sim_name_lower = info->getName(); -- cgit v1.2.3