We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 289e722 commit 5eb8899Copy full SHA for 5eb8899
1 file changed
src/ruisapp/glue/windows/display.cxx
@@ -4,6 +4,7 @@
4
5
#include <utki/debug.hpp>
6
#include <utki/windows.hpp>
7
+#include <utki/enum_iterable.hpp>
8
#include <windowsx.h> // needed for GET_X_LPARAM macro and other similar macros
9
10
#include "application.hxx"
@@ -138,9 +139,7 @@ LRESULT CALLBACK window_procedure(
138
139
);
140
141
// Report mouse button up events for all pressed mouse buttons
- // TODO: iterate over enum using utki::enum_iterator
142
- for (size_t i = 0; i != win.mouse_button_state.size(); ++i) {
143
- auto btn = ruis::mouse_button(i);
+ for (auto btn : utki::enum_iterable_v<decltype(win.mouse_button_state)::enum_type>){
144
if (win.mouse_button_state.get(btn)) {
145
win.mouse_button_state.clear(btn);
146
constexpr auto outside_of_window_coordinate = 100000000;
0 commit comments