aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2018-06-12 06:45:25 +0100
committerYann Herklotz <ymherklotz@gmail.com>2018-06-12 06:45:25 +0100
commitc6217d8b43b6ddf360485f9ba3b731a783482eaa (patch)
tree6e1b0a8b81370f5c37ff311513a1489bc27c7f15
parent39ef9c1cbe660a8369a33eb0ba13cc15be4cfa15 (diff)
downloadYAGE-c6217d8b43b6ddf360485f9ba3b731a783482eaa.tar.gz
YAGE-c6217d8b43b6ddf360485f9ba3b731a783482eaa.zip
Making function `const`
-rw-r--r--yage/core/window.cpp3
-rw-r--r--yage/core/window.h2
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