diff options
author | Yann Herklotz <ymherklotz@gmail.com> | 2018-06-12 06:45:25 +0100 |
---|---|---|
committer | Yann Herklotz <ymherklotz@gmail.com> | 2018-06-12 06:45:25 +0100 |
commit | c6217d8b43b6ddf360485f9ba3b731a783482eaa (patch) | |
tree | 6e1b0a8b81370f5c37ff311513a1489bc27c7f15 | |
parent | 39ef9c1cbe660a8369a33eb0ba13cc15be4cfa15 (diff) | |
download | YAGE-c6217d8b43b6ddf360485f9ba3b731a783482eaa.tar.gz YAGE-c6217d8b43b6ddf360485f9ba3b731a783482eaa.zip |
Making function `const`
-rw-r--r-- | yage/core/window.cpp | 3 | ||||
-rw-r--r-- | 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 |