From 3df0d63a1ac404d9b39644fcb1dd6bf42678b292 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 29 Jun 2014 15:41:34 +0200 Subject: [PATCH] Platform: oh god what have I done. --- src/Magnum/Platform/AndroidApplication.cpp | 32 +++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/Magnum/Platform/AndroidApplication.cpp b/src/Magnum/Platform/AndroidApplication.cpp index cd03be2d0..57b511687 100644 --- a/src/Magnum/Platform/AndroidApplication.cpp +++ b/src/Magnum/Platform/AndroidApplication.cpp @@ -34,13 +34,6 @@ namespace Magnum { namespace Platform { -AndroidApplication::~AndroidApplication() { - eglMakeCurrent(_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); - eglDestroyContext(_display, _context); - eglDestroySurface(_display, _surface); - eglTerminate(_display); -} - struct AndroidApplication::LogOutput { LogOutput(); @@ -48,6 +41,17 @@ struct AndroidApplication::LogOutput { std::ostream debugStream, warningStream, errorStream; }; +AndroidApplication::LogOutput::LogOutput(): + debugBuffer(Utility::AndroidLogStreamBuffer::LogPriority::Info, "magnum"), + warningBuffer(Utility::AndroidLogStreamBuffer::LogPriority::Warning, "magnum"), + errorBuffer(Utility::AndroidLogStreamBuffer::LogPriority::Error, "magnum"), + debugStream(&debugBuffer), warningStream(&warningBuffer), errorStream(&errorBuffer) +{ + Debug::setOutput(&debugStream); + Warning::setOutput(&warningStream); + Error::setOutput(&errorStream); +} + #ifndef DOXYGEN_GENERATING_OUTPUT AndroidApplication::AndroidApplication(const Arguments& arguments): AndroidApplication{arguments, Configuration{}} {} #endif @@ -61,15 +65,11 @@ AndroidApplication::AndroidApplication(const Arguments& arguments, std::nullptr_ _logOutput.reset(new LogOutput); } -AndroidApplication::LogOutput::LogOutput(): - debugBuffer(Utility::AndroidLogStreamBuffer::LogPriority::Info, "magnum"), - warningBuffer(Utility::AndroidLogStreamBuffer::LogPriority::Warning, "magnum"), - errorBuffer(Utility::AndroidLogStreamBuffer::LogPriority::Error, "magnum"), - debugStream(&debugBuffer), warningStream(&warningBuffer), errorStream(&errorBuffer) -{ - Debug::setOutput(&debugStream); - Warning::setOutput(&warningStream); - Error::setOutput(&errorStream); +AndroidApplication::~AndroidApplication() { + eglMakeCurrent(_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); + eglDestroyContext(_display, _context); + eglDestroySurface(_display, _surface); + eglTerminate(_display); } void AndroidApplication::createContext() { createContext({}); }