diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-06-17 13:07:27 +0300 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-06-18 23:46:50 +0300 |
commit | c20c1d6a6b3eb301db88ca3e74993f445cc4d839 (patch) | |
tree | 7011952bc5cc49d62b2be4b96ba3c3c7bbd3e54d /include/mbgl/util/color.hpp | |
parent | 41497e9c4174d310f3a62548f3cfeb9da2852849 (diff) | |
download | qtlocation-mapboxgl-c20c1d6a6b3eb301db88ca3e74993f445cc4d839.tar.gz |
[core] Avoid redundant 'inline' usage
Diffstat (limited to 'include/mbgl/util/color.hpp')
-rw-r--r-- | include/mbgl/util/color.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/mbgl/util/color.hpp b/include/mbgl/util/color.hpp index 6491f75801..4be380fde3 100644 --- a/include/mbgl/util/color.hpp +++ b/include/mbgl/util/color.hpp @@ -20,15 +20,15 @@ public: static optional<Color> parse(const std::string&); }; -inline bool operator==(const Color& colorA, const Color& colorB) { +constexpr bool operator==(const Color& colorA, const Color& colorB) { return colorA.r == colorB.r && colorA.g == colorB.g && colorA.b == colorB.b && colorA.a == colorB.a; } -inline bool operator!=(const Color& colorA, const Color& colorB) { +constexpr bool operator!=(const Color& colorA, const Color& colorB) { return !(colorA == colorB); } -inline Color operator*(const Color& color, float alpha) { +constexpr Color operator*(const Color& color, float alpha) { return { color.r * alpha, color.g * alpha, |