From c6217d8b43b6ddf360485f9ba3b731a783482eaa Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Tue, 12 Jun 2018 06:45:25 +0100 Subject: Making function `const` --- yage/core/window.cpp | 3 ++- yage/core/window.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/yage/core/window.cpp b/yage/core/window.cpp index 25f9f834..392d4363 100644 --- a/yage/core/window.cpp +++ b/yage/core/window.cpp @@ -61,6 +61,7 @@ void Window::create(std::string window_name, int width, int height) // set key callback glfwSetKeyCallback(window_, key_callback); + // set resize callback glfwSetFramebufferSizeCallback(window_, framebuffer_size_callback); @@ -108,7 +109,7 @@ void Window::pollEvents() const glfwPollEvents(); } -bool Window::keyPressed(key k) +bool Window::keyPressed(key k) const { if (window_ == nullptr) { throw runtime_error("Window is not initialized"); diff --git a/yage/core/window.h b/yage/core/window.h index 2ffafba8..6b0e7fed 100644 --- a/yage/core/window.h +++ b/yage/core/window.h @@ -56,7 +56,7 @@ public: bool shouldClose(); void pollEvents() const; - bool keyPressed(key k); + bool keyPressed(key k) const; }; } // namespace yage -- cgit