diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2017-07-11 15:32:51 +0300 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2017-07-12 20:42:29 +0300 |
commit | 6282b28b6fe218390b843a8a71bb5cc2b63dd05c (patch) | |
tree | 5c45fe4caad2571494d6d237b76c8eced84e0d2b /src/mbgl/map/update.hpp | |
parent | d918f8d7c2e9eb4e3514078da6621c159e67069c (diff) | |
download | qtlocation-mapboxgl-6282b28b6fe218390b843a8a71bb5cc2b63dd05c.tar.gz |
[core] Added MBGL_CONSTEXPR to satisfy GCC 4.9
Diffstat (limited to 'src/mbgl/map/update.hpp')
-rw-r--r-- | src/mbgl/map/update.hpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mbgl/map/update.hpp b/src/mbgl/map/update.hpp index 82d98284f5..ab8b10c651 100644 --- a/src/mbgl/map/update.hpp +++ b/src/mbgl/map/update.hpp @@ -1,6 +1,7 @@ #pragma once #include <mbgl/util/traits.hpp> +#include <mbgl/util/util.hpp> namespace mbgl { @@ -11,15 +12,15 @@ enum class Update { AnnotationData = 1 << 7 }; -constexpr Update operator|(Update lhs, Update rhs) { +MBGL_CONSTEXPR Update operator|(Update lhs, Update rhs) { return Update(mbgl::underlying_type(lhs) | mbgl::underlying_type(rhs)); } -constexpr Update& operator|=(Update& lhs, const Update& rhs) { +MBGL_CONSTEXPR Update& operator|=(Update& lhs, const Update& rhs) { return (lhs = lhs | rhs); } -constexpr bool operator& (Update lhs, Update rhs) { +MBGL_CONSTEXPR bool operator& (Update lhs, Update rhs) { return mbgl::underlying_type(lhs) & mbgl::underlying_type(rhs); } |