Take callback as a const ref

This commit is contained in:
Riyyi
2021-01-15 12:38:09 +01:00
parent bb2b1ed38f
commit 74ab4f0b70
+1 -1
View File
@@ -46,7 +46,7 @@ namespace Inferno {
inline GLFWwindow* getWindow() const { return m_window; } inline GLFWwindow* getWindow() const { return m_window; }
inline const std::shared_ptr<Context>& getContext() const { return m_context; } inline const std::shared_ptr<Context>& getContext() const { return m_context; }
inline void setEventCallback(std::function<void(Event&)> callback) { m_eventCallback = callback; } inline void setEventCallback(const std::function<void(Event&)>& callback) { m_eventCallback = callback; }
private: private:
WindowProperties m_properties; WindowProperties m_properties;