diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2016-02-23 17:55:22 +0100 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2016-02-24 15:58:56 +0100 |
commit | 9557cd8d93749b70c16521e15e156d02baa4bda7 (patch) | |
tree | 57918d712861b96c3b2d6df0d7375218b52a3a49 /src/mbgl/layer/custom_layer.hpp | |
parent | f4bf96162219cb9700d8bdaf6a16da3395e076c8 (diff) | |
download | qtlocation-mapboxgl-9557cd8d93749b70c16521e15e156d02baa4bda7.tar.gz |
[core] use a store enum instead of RTTI
RTTI is pretty slow, in particular in iOS devices
Diffstat (limited to 'src/mbgl/layer/custom_layer.hpp')
-rw-r--r-- | src/mbgl/layer/custom_layer.hpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mbgl/layer/custom_layer.hpp b/src/mbgl/layer/custom_layer.hpp index 315d158802..b54ac7481e 100644 --- a/src/mbgl/layer/custom_layer.hpp +++ b/src/mbgl/layer/custom_layer.hpp @@ -38,6 +38,11 @@ private: void* context = nullptr; }; +template <> +inline bool StyleLayer::is<CustomLayer>() const { + return type == Type::Custom; +} + } // namespace mbgl #endif |