diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2017-05-18 14:30:20 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2017-05-19 12:12:47 +0200 |
commit | b52e171b6737522fe5e7739646f523becd315381 (patch) | |
tree | 97a90ea3a772c5d79a64533052c8bed1bd7d6d64 /src | |
parent | f0b0167640fa6cbd852ec1bed237277ee7c5f06d (diff) | |
download | qtlocation-mapboxgl-b52e171b6737522fe5e7739646f523becd315381.tar.gz |
[core] add error for non-virtual destructor deletes + add virtual dtors
Diffstat (limited to 'src')
-rw-r--r-- | src/mbgl/programs/symbol_program.hpp | 8 | ||||
-rw-r--r-- | src/mbgl/sprite/sprite_atlas.hpp | 1 | ||||
-rw-r--r-- | src/mbgl/text/glyph_atlas.hpp | 1 |
3 files changed, 7 insertions, 3 deletions
diff --git a/src/mbgl/programs/symbol_program.hpp b/src/mbgl/programs/symbol_program.hpp index 1cac99bfc2..46f532e5c4 100644 --- a/src/mbgl/programs/symbol_program.hpp +++ b/src/mbgl/programs/symbol_program.hpp @@ -93,6 +93,8 @@ public: // particular attribute & uniform logic needed by each possible type of the {Text,Icon}Size properties. class SymbolSizeBinder { public: + virtual ~SymbolSizeBinder() = default; + using Uniforms = gl::Uniforms< uniforms::u_is_size_zoom_constant, uniforms::u_is_size_feature_constant, @@ -129,7 +131,7 @@ Range<float> getCoveringStops(Stops s, float lowerZoom, float upperZoom) { }; } -class ConstantSymbolSizeBinder : public SymbolSizeBinder { +class ConstantSymbolSizeBinder final : public SymbolSizeBinder { public: using PropertyValue = variant<float, style::CameraFunction<float>>; @@ -198,7 +200,7 @@ public: optional<style::CameraFunction<float>> function; }; -class SourceFunctionSymbolSizeBinder : public SymbolSizeBinder { +class SourceFunctionSymbolSizeBinder final : public SymbolSizeBinder { public: using Vertex = gl::detail::Vertex<gl::Attribute<uint16_t, 1>>; using VertexVector = gl::VertexVector<Vertex>; @@ -251,7 +253,7 @@ public: optional<VertexBuffer> buffer; }; -class CompositeFunctionSymbolSizeBinder: public SymbolSizeBinder { +class CompositeFunctionSymbolSizeBinder final : public SymbolSizeBinder { public: using Vertex = SymbolSizeAttributes::Vertex; using VertexVector = gl::VertexVector<Vertex>; diff --git a/src/mbgl/sprite/sprite_atlas.hpp b/src/mbgl/sprite/sprite_atlas.hpp index 5afddaebce..c3efeff44b 100644 --- a/src/mbgl/sprite/sprite_atlas.hpp +++ b/src/mbgl/sprite/sprite_atlas.hpp @@ -43,6 +43,7 @@ typedef std::set<std::string> IconDependencies; class IconRequestor { public: + virtual ~IconRequestor() = default; virtual void onIconsAvailable(IconMap) = 0; }; diff --git a/src/mbgl/text/glyph_atlas.hpp b/src/mbgl/text/glyph_atlas.hpp index f4c4601530..ad9cf35adc 100644 --- a/src/mbgl/text/glyph_atlas.hpp +++ b/src/mbgl/text/glyph_atlas.hpp @@ -30,6 +30,7 @@ class Context; class GlyphRequestor { public: + virtual ~GlyphRequestor() = default; virtual void onGlyphsAvailable(GlyphPositionMap) = 0; }; |