From 1f5587b3ea23d03364107f39b24ff16545d04dd7 Mon Sep 17 00:00:00 2001 From: Bruno de Oliveira Abinader Date: Thu, 28 Apr 2016 18:24:24 +0300 Subject: [core] Added mbgl::underlying_type --- include/mbgl/map/update.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include/mbgl/map') 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 + #include namespace mbgl { @@ -16,7 +18,7 @@ enum class Update : uint8_t { }; inline Update operator| (const Update& lhs, const Update& rhs) { - return Update(static_cast(lhs) | static_cast(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(lhs) & static_cast(rhs); + return mbgl::underlying_type(lhs) & mbgl::underlying_type(rhs); } } // namespace mbgl -- cgit v1.2.1