From f59424b00b439a2a932cf684947f993df2231a60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Ka=CC=88fer?= Date: Wed, 4 Jun 2014 10:09:38 +0200 Subject: skip background layer early --- src/map/tile_parser.cpp | 10 ++++++---- 1 file 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 &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 &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 = createBucket(bucket_it->second); -- cgit v1.2.1