diff options
Diffstat (limited to 'include/mbgl/map')
-rw-r--r-- | include/mbgl/map/update.hpp | 6 |
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 |