diff options
author | cflip <cflip@cflip.net> | 2022-03-21 21:31:13 -0600 |
---|---|---|
committer | cflip <cflip@cflip.net> | 2022-03-21 22:13:14 -0600 |
commit | bc5bac66b18de6d377f6b9562f9847e66482bc32 (patch) | |
tree | bb7428fc09d00d2056f5c87befe801f0cd44339a /src/window.h | |
parent | e13dd6b4625f4b56941ae38f9278b175b4c15c05 (diff) |
Minor improvements in Window class
* Ensure event callbacks are not null before calling them
* Mark shouldClose() as const
* Use nullptr instead of NULL
Diffstat (limited to 'src/window.h')
-rw-r--r-- | src/window.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/window.h b/src/window.h index 14494a6..fb9d255 100644 --- a/src/window.h +++ b/src/window.h @@ -16,7 +16,7 @@ public: void update(); void draw(Bitmap&); - bool shouldClose() { return !m_isRunning; } + bool shouldClose() const { return !m_isRunning; } void onMouseDown(std::function<void(int, int, int)> callback) { m_mouseDown = callback; } void onMouseUp(std::function<void(int, int, int)> callback) { m_mouseUp = callback; } |