diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2017-05-10 16:09:02 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2017-06-05 19:38:08 -0700 |
commit | 1cf46d93b944095726396acf84649519e2fd96ad (patch) | |
tree | 40d9e15b9862e1c234dff14151a51c3573f85e80 /test/src | |
parent | 591af0021bfb8b9fdfd803b55fb6c18a24c46943 (diff) | |
download | qtlocation-mapboxgl-1cf46d93b944095726396acf84649519e2fd96ad.tar.gz |
[core] Simplify LayerObserver API
Diffstat (limited to 'test/src')
-rw-r--r-- | test/src/mbgl/test/stub_layer_observer.hpp | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/test/src/mbgl/test/stub_layer_observer.hpp b/test/src/mbgl/test/stub_layer_observer.hpp index 9acd4b077a..0fa413aefe 100644 --- a/test/src/mbgl/test/stub_layer_observer.hpp +++ b/test/src/mbgl/test/stub_layer_observer.hpp @@ -10,29 +10,9 @@ using namespace mbgl::style; */ class StubLayerObserver : public style::LayerObserver { public: - void onLayerFilterChanged(Layer& layer) override { - if (layerFilterChanged) layerFilterChanged(layer); + void onLayerChanged(Layer& layer) override { + if (layerChanged) layerChanged(layer); } - void onLayerVisibilityChanged(Layer& layer) override { - if (layerVisibilityChanged) layerVisibilityChanged(layer); - } - - void onLayerPaintPropertyChanged(Layer& layer) override { - if (layerPaintPropertyChanged) layerPaintPropertyChanged(layer); - } - - void onLayerDataDrivenPaintPropertyChanged(Layer& layer) override { - if (layerDataDrivenPaintPropertyChanged) layerDataDrivenPaintPropertyChanged(layer); - } - - void onLayerLayoutPropertyChanged(Layer& layer, const char * property) override { - if (layerLayoutPropertyChanged) layerLayoutPropertyChanged(layer, property); - } - - std::function<void (Layer&)> layerFilterChanged; - std::function<void (Layer&)> layerVisibilityChanged; - std::function<void (Layer&)> layerPaintPropertyChanged; - std::function<void (Layer&)> layerDataDrivenPaintPropertyChanged; - std::function<void (Layer&, const char *)> layerLayoutPropertyChanged; + std::function<void (Layer&)> layerChanged; }; |