diff --git a/Window.cpp b/Window.cpp index f362b20..a84792a 100644 --- a/Window.cpp +++ b/Window.cpp @@ -26,7 +26,7 @@ Window* Window::from_sdl(Uint32 window_id) { SDL_Window* w {SDL_GetWindowFromID(window_id)}; if (w) { auto it = std::find_if(_windows.begin(), _windows.end(), [w](Window& win) { - return win.get_window() == w; + return win.window() == w; }); if (it != _windows.end()) { return &*it; @@ -57,7 +57,7 @@ bool Window::handle_global_event(const SDL_Event& event) { // remove window from window list SDL_Window* w {SDL_GetWindowFromID(event.window.windowID)}; auto it = std::remove_if(_windows.begin(), _windows.end(), [w](Window& win) { - return win.get_window() == w; + return win.window() == w; }); _windows.erase(it, _windows.end()); if (_windows.size() == 0) { diff --git a/Window.hpp b/Window.hpp index c9825f5..c1adb6e 100644 --- a/Window.hpp +++ b/Window.hpp @@ -35,7 +35,7 @@ namespace sc { void add_event_handler(WindowEventHandler handler, SDL_WindowEventID type); bool handle_event(const SDL_Event& event, bool quit); - SDL_Window* get_window() const { return _w.get(); } + SDL_Window* window() const { return _w.get(); } SDL_Renderer* renderer() const { return _r.get(); } void set_size(int w, int h);