From f3227ba2bf6d2271d29280382c4f0a2baf9732b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 27 Feb 2018 20:00:54 +0100 Subject: [PATCH] Simplify flag combination. I didn't know this was possible, heh. --- src/Magnum/Context.h | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/Magnum/Context.h b/src/Magnum/Context.h index bd004b33d..3c2a4577c 100644 --- a/src/Magnum/Context.h +++ b/src/Magnum/Context.h @@ -233,7 +233,7 @@ class MAGNUM_EXPORT Context { * Resets all state that could cause external code to accidentally * modify Magnum objects. This includes only @ref State::MeshVao. */ - EnterExternal = UnsignedInt(State::MeshVao), + EnterExternal = MeshVao, /** * Reset state on exiting section with external OpenGL code. @@ -241,17 +241,9 @@ class MAGNUM_EXPORT Context { * Resets Magnum state tracker to avoid being confused by external * state changes. This resets all states. */ - ExitExternal = - UnsignedInt(State::Buffers)| - UnsignedInt(State::Framebuffers)| - UnsignedInt(State::Meshes)| - UnsignedInt(State::MeshVao)| - UnsignedInt(State::PixelStorage)| - UnsignedInt(State::Renderer)| - UnsignedInt(State::Shaders)| - UnsignedInt(State::Textures) + ExitExternal = Buffers|Framebuffers|Meshes|MeshVao|PixelStorage|Renderer|Shaders|Textures #ifndef MAGNUM_TARGET_GLES2 - |UnsignedInt(State::TransformFeedback) + |TransformFeedback #endif };