From 90854907b5c9b0fa5a4ab8820b59f42363e2b347 Mon Sep 17 00:00:00 2001 From: Laurent Gomila Date: Sun, 4 Mar 2012 18:47:05 +0100 Subject: [PATCH] Minor internal modifications (renamed New functions to Create) --- src/SFML/Window/Context.cpp | 4 ++-- src/SFML/Window/GlContext.cpp | 8 ++++---- src/SFML/Window/GlContext.hpp | 6 +++--- src/SFML/Window/Window.cpp | 8 ++++---- src/SFML/Window/WindowImpl.cpp | 4 ++-- src/SFML/Window/WindowImpl.hpp | 4 ++-- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/SFML/Window/Context.cpp b/src/SFML/Window/Context.cpp index 961c25083..fa323d5f9 100644 --- a/src/SFML/Window/Context.cpp +++ b/src/SFML/Window/Context.cpp @@ -34,7 +34,7 @@ namespace sf //////////////////////////////////////////////////////////// Context::Context() { - myContext = priv::GlContext::New(); + myContext = priv::GlContext::Create(); SetActive(true); } @@ -56,7 +56,7 @@ bool Context::SetActive(bool active) //////////////////////////////////////////////////////////// Context::Context(const ContextSettings& settings, unsigned int width, unsigned int height) { - myContext = priv::GlContext::New(settings, width, height); + myContext = priv::GlContext::Create(settings, width, height); SetActive(true); } diff --git a/src/SFML/Window/GlContext.cpp b/src/SFML/Window/GlContext.cpp index 73b7f897f..73914c89a 100644 --- a/src/SFML/Window/GlContext.cpp +++ b/src/SFML/Window/GlContext.cpp @@ -84,7 +84,7 @@ namespace { if (!HasInternalContext()) { - internalContext = sf::priv::GlContext::New(); + internalContext = sf::priv::GlContext::Create(); sf::Lock lock(internalContextsMutex); internalContexts.insert(internalContext); } @@ -137,7 +137,7 @@ void GlContext::EnsureContext() //////////////////////////////////////////////////////////// -GlContext* GlContext::New() +GlContext* GlContext::Create() { GlContext* context = new ContextType(sharedContext); context->Initialize(); @@ -147,7 +147,7 @@ GlContext* GlContext::New() //////////////////////////////////////////////////////////// -GlContext* GlContext::New(const ContextSettings& settings, const WindowImpl* owner, unsigned int bitsPerPixel) +GlContext* GlContext::Create(const ContextSettings& settings, const WindowImpl* owner, unsigned int bitsPerPixel) { // Make sure that there's an active context (context creation may need extensions, and thus a valid context) EnsureContext(); @@ -161,7 +161,7 @@ GlContext* GlContext::New(const ContextSettings& settings, const WindowImpl* own //////////////////////////////////////////////////////////// -GlContext* GlContext::New(const ContextSettings& settings, unsigned int width, unsigned int height) +GlContext* GlContext::Create(const ContextSettings& settings, unsigned int width, unsigned int height) { // Make sure that there's an active context (context creation may need extensions, and thus a valid context) EnsureContext(); diff --git a/src/SFML/Window/GlContext.hpp b/src/SFML/Window/GlContext.hpp index f6eb193a0..4fde387b2 100644 --- a/src/SFML/Window/GlContext.hpp +++ b/src/SFML/Window/GlContext.hpp @@ -86,7 +86,7 @@ public : /// \return Pointer to the created context (don't forget to delete it) /// //////////////////////////////////////////////////////////// - static GlContext* New(); + static GlContext* Create(); //////////////////////////////////////////////////////////// /// \brief Create a new context attached to a window @@ -101,7 +101,7 @@ public : /// \return Pointer to the created context /// //////////////////////////////////////////////////////////// - static GlContext* New(const ContextSettings& settings, const WindowImpl* owner, unsigned int bitsPerPixel); + static GlContext* Create(const ContextSettings& settings, const WindowImpl* owner, unsigned int bitsPerPixel); //////////////////////////////////////////////////////////// /// \brief Create a new context that embeds its own rendering target @@ -116,7 +116,7 @@ public : /// \return Pointer to the created context /// //////////////////////////////////////////////////////////// - static GlContext* New(const ContextSettings& settings, unsigned int width, unsigned int height); + static GlContext* Create(const ContextSettings& settings, unsigned int width, unsigned int height); public : diff --git a/src/SFML/Window/Window.cpp b/src/SFML/Window/Window.cpp index 741dd964d..19ef9491c 100644 --- a/src/SFML/Window/Window.cpp +++ b/src/SFML/Window/Window.cpp @@ -111,10 +111,10 @@ void Window::Create(VideoMode mode, const std::string& title, Uint32 style, cons style |= Style::Titlebar; // Recreate the window implementation - myImpl = priv::WindowImpl::New(mode, title, style); + myImpl = priv::WindowImpl::Create(mode, title, style); // Recreate the context - myContext = priv::GlContext::New(settings, myImpl, mode.BitsPerPixel); + myContext = priv::GlContext::Create(settings, myImpl, mode.BitsPerPixel); // Perform common initializations Initialize(); @@ -128,10 +128,10 @@ void Window::Create(WindowHandle handle, const ContextSettings& settings) Close(); // Recreate the window implementation - myImpl = priv::WindowImpl::New(handle); + myImpl = priv::WindowImpl::Create(handle); // Recreate the context - myContext = priv::GlContext::New(settings, myImpl, VideoMode::GetDesktopMode().BitsPerPixel); + myContext = priv::GlContext::Create(settings, myImpl, VideoMode::GetDesktopMode().BitsPerPixel); // Perform common initializations Initialize(); diff --git a/src/SFML/Window/WindowImpl.cpp b/src/SFML/Window/WindowImpl.cpp index 3f414e27e..705ba423d 100644 --- a/src/SFML/Window/WindowImpl.cpp +++ b/src/SFML/Window/WindowImpl.cpp @@ -55,14 +55,14 @@ namespace sf namespace priv { //////////////////////////////////////////////////////////// -WindowImpl* WindowImpl::New(VideoMode mode, const std::string& title, Uint32 style) +WindowImpl* WindowImpl::Create(VideoMode mode, const std::string& title, Uint32 style) { return new WindowImplType(mode, title, style); } //////////////////////////////////////////////////////////// -WindowImpl* WindowImpl::New(WindowHandle handle) +WindowImpl* WindowImpl::Create(WindowHandle handle) { return new WindowImplType(handle); } diff --git a/src/SFML/Window/WindowImpl.hpp b/src/SFML/Window/WindowImpl.hpp index add622cc0..157734a6f 100644 --- a/src/SFML/Window/WindowImpl.hpp +++ b/src/SFML/Window/WindowImpl.hpp @@ -64,7 +64,7 @@ public : /// \return Pointer to the created window (don't forget to delete it) /// //////////////////////////////////////////////////////////// - static WindowImpl* New(VideoMode mode, const std::string& title, Uint32 style); + static WindowImpl* Create(VideoMode mode, const std::string& title, Uint32 style); //////////////////////////////////////////////////////////// /// \brief Create a new window depending on to the current OS @@ -74,7 +74,7 @@ public : /// \return Pointer to the created window (don't forget to delete it) /// //////////////////////////////////////////////////////////// - static WindowImpl* New(WindowHandle handle); + static WindowImpl* Create(WindowHandle handle); public :