const std::list<const CustomSystem*> CustomSystem::GetCustomSystemsForSector(int x, int y, int z) { SystemPath path(x,y,z); SectorMap::iterator map_i = sector_map.find(path); std::list<const CustomSystem*> sector_systems; if (map_i != sector_map.end()) { for (SystemList::iterator i = (*map_i).second.begin(); i != (*map_i).second.end(); ++i) { CustomSystem *cs = &(*i); sector_systems.push_back(cs); } } return sector_systems; }
const CustomSystem::SystemList &CustomSystem::GetCustomSystemsForSector(int x, int y, int z) { SystemPath path(x,y,z); SectorMap::const_iterator it = s_sectorMap.find(path); return (it != s_sectorMap.end()) ? it->second : s_emptySystemList; }