diff --git a/include/blt/window/window.h b/include/blt/window/window.h index c097a1b..0589589 100644 --- a/include/blt/window/window.h +++ b/include/blt/window/window.h @@ -57,11 +57,11 @@ class window { virtual inline bool isKeyDown(int key) const { return keysDown.at(key); } virtual inline bool isMouseDown(int button) const {return mouseDown.at(button);}; // Function signature is window pointer to this, key press, pressed/released (true/false) - virtual inline void registerKeyListener(std::function listener) { + virtual inline void registerKeyListener(const std::function& listener) { keyListeners.push_back(listener); } // Function signature is window pointer to this, mouse button press, pressed/released (true/false) - virtual inline void registerMouseListener(std::function listener) { + virtual inline void registerMouseListener(const std::function& listener) { mouseListeners.push_back(listener); } };