diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-04-28 18:24:24 +0300 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-04-28 18:55:55 +0300 |
commit | 1f5587b3ea23d03364107f39b24ff16545d04dd7 (patch) | |
tree | 9c6c5690c9494389ecf66f00c6b94e301fae7864 /src | |
parent | ffb59864dc04e235c898465dbcb8250ff776a7c9 (diff) | |
download | qtlocation-mapboxgl-1f5587b3ea23d03364107f39b24ff16545d04dd7.tar.gz |
[core] Added mbgl::underlying_type
Diffstat (limited to 'src')
-rw-r--r-- | src/mbgl/renderer/render_pass.hpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mbgl/renderer/render_pass.hpp b/src/mbgl/renderer/render_pass.hpp index a1e965d911..d3b60d0667 100644 --- a/src/mbgl/renderer/render_pass.hpp +++ b/src/mbgl/renderer/render_pass.hpp @@ -1,8 +1,9 @@ #ifndef MBGL_RENDERER_RENDER_PASS #define MBGL_RENDERER_RENDER_PASS +#include <mbgl/util/traits.hpp> + #include <cstdint> -#include <type_traits> namespace mbgl { @@ -13,8 +14,7 @@ enum class RenderPass : uint8_t { }; constexpr inline RenderPass operator|(RenderPass a, RenderPass b) { - return static_cast<RenderPass>(static_cast<std::underlying_type<RenderPass>::type>(a) | - static_cast<std::underlying_type<RenderPass>::type>(b)); + return static_cast<RenderPass>(mbgl::underlying_type(a) | mbgl::underlying_type(b)); } inline RenderPass operator|=(RenderPass& a, RenderPass b) { @@ -22,8 +22,7 @@ inline RenderPass operator|=(RenderPass& a, RenderPass b) { } constexpr inline RenderPass operator&(RenderPass a, RenderPass b) { - return static_cast<RenderPass>(static_cast<std::underlying_type<RenderPass>::type>(a) & - static_cast<std::underlying_type<RenderPass>::type>(b)); + return static_cast<RenderPass>(mbgl::underlying_type(a) & mbgl::underlying_type(b)); } } // namespace mbgl |