From 0007a489c347da50fd5eedb6182d0bc7e22e359c Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Sat, 27 Dec 2014 00:02:08 +0300 Subject: [PATCH] Move Get to the top of memeber functions for consistency with other classes --- SDL2pp/Window.cc | 8 ++++---- SDL2pp/Window.hh | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/SDL2pp/Window.cc b/SDL2pp/Window.cc index 2073941..d77eb18 100644 --- a/SDL2pp/Window.cc +++ b/SDL2pp/Window.cc @@ -50,6 +50,10 @@ Window& Window::operator=(Window&& other) noexcept { return *this; } +SDL_Window* Window::Get() const { + return window_; +} + Point Window::GetSize() const { int w, h; SDL_GetWindowSize(window_, &w, &h); @@ -72,10 +76,6 @@ void Window::SetTitle(const std::string& title) { SDL_SetWindowTitle(window_, title.c_str()); } -SDL_Window* Window::Get() const { - return window_; -} - void Window::Maximize() { SDL_MaximizeWindow(window_); } diff --git a/SDL2pp/Window.hh b/SDL2pp/Window.hh index 3b06c75..e42ea00 100644 --- a/SDL2pp/Window.hh +++ b/SDL2pp/Window.hh @@ -111,6 +111,14 @@ public: Window(const Window& other) = delete; Window& operator=(const Window& other) = delete; + //////////////////////////////////////////////////////////// + /// \brief Get pointer to contained SDL_Window structure + /// + /// \returns Pointer to SDL_Window structure + /// + //////////////////////////////////////////////////////////// + SDL_Window* Get() const; + //////////////////////////////////////////////////////////// /// \brief Get dimensions of the window /// @@ -152,14 +160,6 @@ public: //////////////////////////////////////////////////////////// void SetTitle(const std::string& title); - //////////////////////////////////////////////////////////// - /// \brief Get pointer to contained SDL_Window structure - /// - /// \returns Pointer to SDL_Window structure - /// - //////////////////////////////////////////////////////////// - SDL_Window* Get() const; - //////////////////////////////////////////////////////////// /// \brief Make a window as large as possible ///