summaryrefslogtreecommitdiff
path: root/src/mbgl/text/cross_tile_symbol_index.cpp
diff options
context:
space:
mode:
authorChris Loer <chris.loer@gmail.com>2018-05-01 13:05:51 -0700
committerChris Loer <chris.loer@mapbox.com>2018-05-02 09:42:03 -0700
commita96fe6ad87d386f25a57a2a7a6632382951733f0 (patch)
treedb6c214533085eedaa947d8e23c76df788bf5958 /src/mbgl/text/cross_tile_symbol_index.cpp
parent5a147f6335314defeed26c570ebcfe217e2af5d9 (diff)
downloadqtlocation-mapboxgl-a96fe6ad87d386f25a57a2a7a6632382951733f0.tar.gz
[core] Don't copy TileLayerIndexes on every frame.
Fixes issue #11811 (too much CPU time spent in CrossTileSymbolIndex).
Diffstat (limited to 'src/mbgl/text/cross_tile_symbol_index.cpp')
-rw-r--r--src/mbgl/text/cross_tile_symbol_index.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mbgl/text/cross_tile_symbol_index.cpp b/src/mbgl/text/cross_tile_symbol_index.cpp
index f88bab9d6f..01a4a02b4e 100644
--- a/src/mbgl/text/cross_tile_symbol_index.cpp
+++ b/src/mbgl/text/cross_tile_symbol_index.cpp
@@ -62,7 +62,7 @@ CrossTileSymbolLayerIndex::CrossTileSymbolLayerIndex() {
}
bool CrossTileSymbolLayerIndex::addBucket(const OverscaledTileID& tileID, SymbolBucket& bucket, uint32_t& maxCrossTileID) {
- auto thisZoomIndexes = indexes[tileID.overscaledZ];
+ const auto& thisZoomIndexes = indexes[tileID.overscaledZ];
auto previousIndex = thisZoomIndexes.find(tileID);
if (previousIndex != thisZoomIndexes.end()) {
if (previousIndex->second.bucketInstanceId == bucket.bucketInstanceId) {