1 #pragma once 2 3 #include <mbgl/util/optional.hpp> 4 5 namespace mbgl { 6 7 template <class T> 8 class PaintPropertyStatistics { 9 public: max() const10 optional<T> max() const { return {}; } add(const T &)11 void add(const T&) {} 12 }; 13 14 template <> 15 class PaintPropertyStatistics<float> { 16 public: max() const17 optional<float> max() const { 18 return _max; 19 } 20 add(float value)21 void add(float value) { 22 _max = _max ? std::max(*_max, value) : value; 23 } 24 25 private: 26 optional<float> _max; 27 }; 28 29 } // namespace mbgl 30