diff options
Diffstat (limited to 'include/mbgl/style/function.hpp')
-rw-r--r-- | include/mbgl/style/function.hpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/mbgl/style/function.hpp b/include/mbgl/style/function.hpp index 44ffa31079..97e880b280 100644 --- a/include/mbgl/style/function.hpp +++ b/include/mbgl/style/function.hpp @@ -21,7 +21,19 @@ public: private: float base = 1; std::vector<std::pair<float, T>> stops; + + template <class S> friend bool operator==(const Function<S>&, const Function<S>&); }; +template <class T> +bool operator==(const Function<T>& lhs, const Function<T>& rhs) { + return lhs.base == rhs.base && lhs.stops == rhs.stops; +} + +template <class T> +bool operator!=(const Function<T>& lhs, const Function<T>& rhs) { + return !(lhs == rhs); +} + } // namespace style } // namespace mbgl |