summaryrefslogtreecommitdiff
path: root/include/mbgl/map
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2016-04-28 18:24:24 +0300
committerBruno de Oliveira Abinader <bruno@mapbox.com>2016-04-28 18:55:55 +0300
commit1f5587b3ea23d03364107f39b24ff16545d04dd7 (patch)
tree9c6c5690c9494389ecf66f00c6b94e301fae7864 /include/mbgl/map
parentffb59864dc04e235c898465dbcb8250ff776a7c9 (diff)
downloadqtlocation-mapboxgl-1f5587b3ea23d03364107f39b24ff16545d04dd7.tar.gz
[core] Added mbgl::underlying_type
Diffstat (limited to 'include/mbgl/map')
-rw-r--r--include/mbgl/map/update.hpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/mbgl/map/update.hpp b/include/mbgl/map/update.hpp
index e47feea949..4ad1b1d195 100644
--- a/include/mbgl/map/update.hpp
+++ b/include/mbgl/map/update.hpp
@@ -1,6 +1,8 @@
#ifndef MBGL_MAP_UPDATE
#define MBGL_MAP_UPDATE
+#include <mbgl/util/traits.hpp>
+
#include <cstdint>
namespace mbgl {
@@ -16,7 +18,7 @@ enum class Update : uint8_t {
};
inline Update operator| (const Update& lhs, const Update& rhs) {
- return Update(static_cast<uint8_t>(lhs) | static_cast<uint8_t>(rhs));
+ return Update(mbgl::underlying_type(lhs) | mbgl::underlying_type(rhs));
}
inline Update& operator|=(Update& lhs, const Update& rhs) {
@@ -25,7 +27,7 @@ inline Update& operator|=(Update& lhs, const Update& rhs) {
}
inline bool operator& (const Update& lhs, const Update& rhs) {
- return static_cast<uint8_t>(lhs) & static_cast<uint8_t>(rhs);
+ return mbgl::underlying_type(lhs) & mbgl::underlying_type(rhs);
}
} // namespace mbgl