From bc5bac66b18de6d377f6b9562f9847e66482bc32 Mon Sep 17 00:00:00 2001 From: cflip Date: Mon, 21 Mar 2022 21:31:13 -0600 Subject: Minor improvements in Window class * Ensure event callbacks are not null before calling them * Mark shouldClose() as const * Use nullptr instead of NULL --- src/window.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/window.h') 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 callback) { m_mouseDown = callback; } void onMouseUp(std::function callback) { m_mouseUp = callback; } -- cgit v1.2.3