From a9aee1935dce7ad69a7246886716a5515472b94a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 8 May 2015 21:00:00 +0200 Subject: [PATCH] Platform: cleanup in AndroidApplication. --- src/Magnum/Platform/AndroidApplication.cpp | 8 ++++---- src/Magnum/Platform/AndroidApplication.h | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Magnum/Platform/AndroidApplication.cpp b/src/Magnum/Platform/AndroidApplication.cpp index 303d0f85f..c61d2c379 100644 --- a/src/Magnum/Platform/AndroidApplication.cpp +++ b/src/Magnum/Platform/AndroidApplication.cpp @@ -67,7 +67,7 @@ AndroidApplication::AndroidApplication(const Arguments& arguments, std::nullptr_ AndroidApplication::~AndroidApplication() { eglMakeCurrent(_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); - eglDestroyContext(_display, _context); + eglDestroyContext(_display, _glContext); eglDestroySurface(_display, _surface); eglTerminate(_display); } @@ -127,16 +127,16 @@ bool AndroidApplication::tryCreateContext(const Configuration& configuration) { #endif EGL_NONE }; - if(!(_context = eglCreateContext(_display, config, EGL_NO_CONTEXT, contextAttributes))) { + if(!(_glContext = eglCreateContext(_display, config, EGL_NO_CONTEXT, contextAttributes))) { Error() << "Platform::AndroidApplication::tryCreateContext(): cannot create EGL context:" << Implementation::eglErrorString(eglGetError()); return false; } /* Make the context current */ - CORRADE_INTERNAL_ASSERT_OUTPUT(eglMakeCurrent(_display, _surface, _surface, _context)); + CORRADE_INTERNAL_ASSERT_OUTPUT(eglMakeCurrent(_display, _surface, _surface, _glContext)); - _c.reset(new Platform::Context); + _context.reset(new Platform::Context); return true; } diff --git a/src/Magnum/Platform/AndroidApplication.h b/src/Magnum/Platform/AndroidApplication.h index abfbefa61..aa96ca5b6 100644 --- a/src/Magnum/Platform/AndroidApplication.h +++ b/src/Magnum/Platform/AndroidApplication.h @@ -310,9 +310,9 @@ class AndroidApplication { EGLDisplay _display; EGLSurface _surface; - EGLContext _context; + EGLContext _glContext; - std::unique_ptr _c; + std::unique_ptr _context; std::unique_ptr _logOutput; CORRADE_ENUMSET_FRIEND_OPERATORS(Flags) @@ -485,7 +485,7 @@ class AndroidApplication::MouseEvent: public InputEvent { } private: - MouseEvent(AInputEvent* event): InputEvent(event) {} + explicit MouseEvent(AInputEvent* event): InputEvent(event) {} }; /** @@ -561,7 +561,7 @@ class AndroidApplication::MouseMoveEvent: public InputEvent { } private: - MouseMoveEvent(AInputEvent* event): InputEvent(event) {} + explicit MouseMoveEvent(AInputEvent* event): InputEvent(event) {} }; CORRADE_ENUMSET_OPERATORS(AndroidApplication::MouseMoveEvent::Buttons)