diff --git a/include/mbgl/style/function.hpp b/include/mbgl/style/function.hpp index 3aefba660..6103f85e3 100644 --- a/include/mbgl/style/function.hpp +++ b/include/mbgl/style/function.hpp @@ -20,22 +20,18 @@ public: float getBase() const { return base; } const std::vector>& getStops() const { return stops; } + friend bool operator==(const Function& lhs, const Function& rhs) { + return lhs.base == rhs.base && lhs.stops == rhs.stops; + } + + friend bool operator!=(const Function& lhs, const Function& rhs) { + return !(lhs == rhs); + } + private: float base = 1; std::vector> stops; - - template friend bool operator==(const Function&, const Function&); }; -template -bool operator==(const Function& lhs, const Function& rhs) { - return lhs.base == rhs.base && lhs.stops == rhs.stops; -} - -template -bool operator!=(const Function& lhs, const Function& rhs) { - return !(lhs == rhs); -} - } // namespace style } // namespace mbgl diff --git a/include/mbgl/style/property_value.hpp b/include/mbgl/style/property_value.hpp index 859b683d5..83c4b4cf1 100644 --- a/include/mbgl/style/property_value.hpp +++ b/include/mbgl/style/property_value.hpp @@ -17,7 +17,13 @@ private: using Value = variant>; Value value; - template friend bool operator==(const PropertyValue&, const PropertyValue&); + friend bool operator==(const PropertyValue& lhs, const PropertyValue& rhs) { + return lhs.value == rhs.value; + } + + friend bool operator!=(const PropertyValue& lhs, const PropertyValue& rhs) { + return !(lhs == rhs); + } public: PropertyValue() : value() {} @@ -39,15 +45,5 @@ public: } }; -template -bool operator==(const PropertyValue& lhs, const PropertyValue& rhs) { - return lhs.value == rhs.value; -} - -template -bool operator!=(const PropertyValue& lhs, const PropertyValue& rhs) { - return !(lhs == rhs); -} - } // namespace style } // namespace mbgl