Move Get to the top of memeber functions for consistency with other classes

This commit is contained in:
Dmitry Marakasov 2014-12-27 00:02:08 +03:00
parent f4c2832d90
commit 0007a489c3
2 changed files with 12 additions and 12 deletions

View File

@ -50,6 +50,10 @@ Window& Window::operator=(Window&& other) noexcept {
return *this; return *this;
} }
SDL_Window* Window::Get() const {
return window_;
}
Point Window::GetSize() const { Point Window::GetSize() const {
int w, h; int w, h;
SDL_GetWindowSize(window_, &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_SetWindowTitle(window_, title.c_str());
} }
SDL_Window* Window::Get() const {
return window_;
}
void Window::Maximize() { void Window::Maximize() {
SDL_MaximizeWindow(window_); SDL_MaximizeWindow(window_);
} }

View File

@ -111,6 +111,14 @@ public:
Window(const Window& other) = delete; Window(const Window& other) = delete;
Window& operator=(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 /// \brief Get dimensions of the window
/// ///
@ -152,14 +160,6 @@ public:
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
void SetTitle(const std::string& title); 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 /// \brief Make a window as large as possible
/// ///