diff options
author | Ivo van Dongen <info@ivovandongen.nl> | 2017-05-29 15:09:34 +0300 |
---|---|---|
committer | Ivo van Dongen <ivovandongen@users.noreply.github.com> | 2017-05-30 13:07:03 +0300 |
commit | ff3dc29ffd371227a0013ed14176d5c5d6d96b0b (patch) | |
tree | ae22040af924c1bd9e4c845491ae25c66de3ddae /include | |
parent | b83dfb7eb53cd7c13c98149220b960351501c8c1 (diff) | |
download | qtlocation-mapboxgl-ff3dc29ffd371227a0013ed14176d5c5d6d96b0b.tar.gz |
[core] ensure layer::accept works with non-void return values on gcc
Diffstat (limited to 'include')
-rw-r--r-- | include/mbgl/style/layer.hpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/mbgl/style/layer.hpp b/include/mbgl/style/layer.hpp index 02153ad092..c6a3c0e735 100644 --- a/include/mbgl/style/layer.hpp +++ b/include/mbgl/style/layer.hpp @@ -6,8 +6,10 @@ #include <mbgl/style/layer_type.hpp> #include <mbgl/style/types.hpp> +#include <cassert> #include <memory> #include <string> +#include <stdexcept> namespace mbgl { namespace style { @@ -89,6 +91,11 @@ public: case LayerType::FillExtrusion: return std::forward<V>(visitor)(*as<FillExtrusionLayer>()); } + + + // Not reachable, but placate GCC. + assert(false); + throw new std::runtime_error("unknown layer type"); } LayerType getType() const; |