use unordered map, don't make copies (auto usage!) and swap maps
This commit is contained in:
@@ -11,8 +11,8 @@ void Painter::renderIcon(IconBucket& bucket, const std::string& layer_name, cons
|
||||
if (!bucket.hasData()) return;
|
||||
if (pass == Opaque) return;
|
||||
|
||||
auto icon_properties = map.getStyle().computed.icons;
|
||||
auto icon_properties_it = icon_properties.find(layer_name);
|
||||
const std::unordered_map<std::string, IconProperties> &icon_properties = map.getStyle().computed.icons;
|
||||
const std::unordered_map<std::string, IconProperties>::const_iterator icon_properties_it = icon_properties.find(layer_name);
|
||||
if (icon_properties_it == icon_properties.end()) return;
|
||||
|
||||
const IconProperties& properties = icon_properties_it->second;
|
||||
|
||||
Reference in New Issue
Block a user