summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-06-04 10:09:38 +0200
committerKonstantin Käfer <mail@kkaefer.com>2014-06-04 10:09:38 +0200
commitf59424b00b439a2a932cf684947f993df2231a60 (patch)
tree67824bc0ee3f6738ee0edf38fd5a28eccacefa32
parentfbd983f1048a0fb399d0e77b3c165a66268e7cbb (diff)
downloadqtlocation-mapboxgl-f59424b00b439a2a932cf684947f993df2231a60.tar.gz
skip background layer early
-rw-r--r--src/map/tile_parser.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/map/tile_parser.cpp b/src/map/tile_parser.cpp
index 2af5278f5b..2c51aa3e50 100644
--- a/src/map/tile_parser.cpp
+++ b/src/map/tile_parser.cpp
@@ -68,6 +68,11 @@ void TileParser::parseStyleLayers(const std::vector<LayerDescription> &layers) {
return;
}
+ if (layer_desc.bucket_name == "background") {
+ // background is a special, fake bucket
+ continue;
+ }
+
if (layer_desc.child_layer.size()) {
// This is a layer group.
// TODO: create framebuffer
@@ -79,10 +84,7 @@ void TileParser::parseStyleLayers(const std::vector<LayerDescription> &layers) {
auto bucket_it = tile.buckets.find(layer_desc.bucket_name);
if (bucket_it == tile.buckets.end()) {
auto bucket_it = style->buckets.find(layer_desc.bucket_name);
- if (layer_desc.bucket_name == "background") {
- // background is a special, fake bucket
- continue;
- } else if (bucket_it != style->buckets.end()) {
+ if (bucket_it != style->buckets.end()) {
// Only create the new bucket if we have an actual specification
// for it.
std::unique_ptr<Bucket> bucket = createBucket(bucket_it->second);