From 891cd261b885481a457fdb32e659b63dbf6e7379 Mon Sep 17 00:00:00 2001 From: Jonathan De Wachter Date: Thu, 14 Nov 2013 17:20:29 +0100 Subject: [PATCH] Removed unnecessary sf:: prefix --- src/SFML/Main/MainAndroid.cpp | 16 ++++++++-------- src/SFML/Window/Android/EglContext.cpp | 4 ++-- src/SFML/Window/Android/InputImpl.cpp | 2 +- src/SFML/Window/Android/VideoModeImpl.cpp | 2 +- src/SFML/Window/Android/WindowImplAndroid.cpp | 10 +++++----- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/SFML/Main/MainAndroid.cpp b/src/SFML/Main/MainAndroid.cpp index cf2fc51ed..46bb08e2f 100644 --- a/src/SFML/Main/MainAndroid.cpp +++ b/src/SFML/Main/MainAndroid.cpp @@ -55,13 +55,13 @@ namespace priv ActivityStates* retrieveStates(ANativeActivity* activity) { // Hide the ugly cast we find in each callback function - return (sf::priv::ActivityStates*)activity->instance; + return (ActivityStates*)activity->instance; } static void initializeMain(ActivityStates* states) { // Protect from concurent access - sf::Lock lock(states->mutex); + Lock lock(states->mutex); // Prepare and share the looper to be read later ALooper* looper = ALooper_prepare(ALOOPER_PREPARE_ALLOW_NON_CALLBACKS); @@ -75,9 +75,9 @@ static void initializeMain(ActivityStates* states) static void terminateMain(ActivityStates* states) { // Protect from concurent access - sf::Lock lock(states->mutex); + Lock lock(states->mutex); - // The main thread is over, we must explicitly ask the activity to finish + // The main thread has finished, we must explicitly ask the activity to finish states->mainOver = true; ANativeActivity_finish(states->activity); } @@ -88,19 +88,19 @@ void* main(ActivityStates* states) initializeMain(states); { - sf::Lock lock(states->mutex); + Lock lock(states->mutex); states->initialized = true; } - sf::sleep(sf::seconds(0.5)); + sleep(seconds(0.5)); ::main(0, NULL); - // Terminate properly the thread and Wait until it's done + // Terminate properly the main thread and wait until it's done terminateMain(states); { - sf::Lock lock(states->mutex); + Lock lock(states->mutex); states->terminated = true; } diff --git a/src/SFML/Window/Android/EglContext.cpp b/src/SFML/Window/Android/EglContext.cpp index c35e1e81f..fb8f866db 100644 --- a/src/SFML/Window/Android/EglContext.cpp +++ b/src/SFML/Window/Android/EglContext.cpp @@ -48,7 +48,7 @@ m_surface (EGL_NO_SURFACE) { // Get the activity states and protect it from concurent access ActivityStates* states = getActivity(NULL); - sf::Lock lock(states->mutex); + Lock lock(states->mutex); // Get the intialized EGL display m_display = states->display; @@ -85,7 +85,7 @@ m_surface (EGL_NO_SURFACE) { // Get the activity states and protect it from concurent access ActivityStates* states = getActivity(NULL); - sf::Lock lock(states->mutex); + Lock lock(states->mutex); states->context = this; diff --git a/src/SFML/Window/Android/InputImpl.cpp b/src/SFML/Window/Android/InputImpl.cpp index 61dfb0a09..f0560398c 100644 --- a/src/SFML/Window/Android/InputImpl.cpp +++ b/src/SFML/Window/Android/InputImpl.cpp @@ -49,7 +49,7 @@ void InputImpl::setVirtualKeyboardVisible(bool visible) // todo: Check if the window is active ActivityStates* states = getActivity(NULL); - sf::Lock lock(states->mutex); + Lock lock(states->mutex); // Initializes JNI jint lResult; diff --git a/src/SFML/Window/Android/VideoModeImpl.cpp b/src/SFML/Window/Android/VideoModeImpl.cpp index 3196caeb6..8082c9ce8 100644 --- a/src/SFML/Window/Android/VideoModeImpl.cpp +++ b/src/SFML/Window/Android/VideoModeImpl.cpp @@ -64,7 +64,7 @@ VideoMode VideoModeImpl::getDesktopMode() } // Get size from the window - sf::Vector2i size; + Vector2i size; size.x = ANativeWindow_getWidth(states->window); size.y = ANativeWindow_getHeight(states->window); diff --git a/src/SFML/Window/Android/WindowImplAndroid.cpp b/src/SFML/Window/Android/WindowImplAndroid.cpp index b0b7f65b1..4f15c41be 100644 --- a/src/SFML/Window/Android/WindowImplAndroid.cpp +++ b/src/SFML/Window/Android/WindowImplAndroid.cpp @@ -51,7 +51,7 @@ WindowImplAndroid::WindowImplAndroid(WindowHandle handle) WindowImplAndroid::WindowImplAndroid(VideoMode mode, const std::string& title, unsigned long style, const ContextSettings& settings) { ActivityStates* states = getActivity(NULL); - sf::Lock lock(states->mutex); + Lock lock(states->mutex); // Replace our dummy process event function with the actual one AInputQueue_detachLooper(states->inputQueue); @@ -72,7 +72,7 @@ WindowImplAndroid::~WindowImplAndroid() WindowHandle WindowImplAndroid::getSystemHandle() const { ActivityStates* states = getActivity(NULL); - sf::Lock lock(states->mutex); + Lock lock(states->mutex); return states->window; } @@ -82,7 +82,7 @@ WindowHandle WindowImplAndroid::getSystemHandle() const void WindowImplAndroid::processEvents() { ActivityStates* states = getActivity(NULL); - sf::Lock lock(states->mutex); + Lock lock(states->mutex); // Process incoming OS events ALooper_pollAll(0, NULL, NULL, NULL); @@ -92,7 +92,7 @@ void WindowImplAndroid::processEvents() Event tempEvent = states->pendingEvents.back(); states->pendingEvents.pop_back(); - if (tempEvent.type == sf::Event::Resized) + if (tempEvent.type == Event::Resized) { m_width = tempEvent.size.width; m_height = tempEvent.size.height; @@ -315,7 +315,7 @@ int WindowImplAndroid::processEvent(int fd, int events, void* data) int32_t key = AKeyEvent_getKeyCode(_event); int32_t metakey = AKeyEvent_getMetaState(_event); - sf::Event event; + Event event; event.type = (action == AKEY_EVENT_ACTION_DOWN) ? Event::KeyPressed : Event::KeyReleased; event.key.code = androidKeyToSF(key); event.key.alt = metakey & AMETA_ALT_ON;