summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTobrun <tobrun@mapbox.com>2017-06-09 12:05:54 +0200
committerGitHub <noreply@github.com>2017-06-09 12:05:54 +0200
commit6ec5e4f8cdb98227db11e5989376c31832ca2048 (patch)
tree666de95e35b73f4c6f851e9c243c29fe74ce4465 /include
parentfa972fad60e58e5b8f9f9622f508e9732c8c9ffd (diff)
downloadqtlocation-mapboxgl-6ec5e4f8cdb98227db11e5989376c31832ca2048.tar.gz
Cherry picks to release branch (#9230)
* [ios][macos] test remove source in use * [android] test remove source in use * [core] check source usage before remove * [core] ensure layer::accept works with non-void return values on gcc * [android] - remove upgrade runtime exceptions (#9191)
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/style/layer.hpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/mbgl/style/layer.hpp b/include/mbgl/style/layer.hpp
index 56f2c48fa7..016b3a1c8b 100644
--- a/include/mbgl/style/layer.hpp
+++ b/include/mbgl/style/layer.hpp
@@ -5,8 +5,10 @@
#include <mbgl/style/layer_type.hpp>
#include <mbgl/style/types.hpp>
+#include <cassert>
#include <memory>
#include <string>
+#include <stdexcept>
namespace mbgl {
namespace style {
@@ -96,6 +98,11 @@ public:
case LayerType::FillExtrusion:
return visitor(*as<FillExtrusionLayer>());
}
+
+
+ // Not reachable, but placate GCC.
+ assert(false);
+ throw new std::runtime_error("unknown layer type");
}
const std::string& getID() const;