Skip to content

Commit 5eb8899

Browse files
committed
stuff
1 parent 289e722 commit 5eb8899

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/ruisapp/glue/windows/display.cxx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
#include <utki/debug.hpp>
66
#include <utki/windows.hpp>
7+
#include <utki/enum_iterable.hpp>
78
#include <windowsx.h> // needed for GET_X_LPARAM macro and other similar macros
89

910
#include "application.hxx"
@@ -138,9 +139,7 @@ LRESULT CALLBACK window_procedure(
138139
);
139140

140141
// Report mouse button up events for all pressed mouse buttons
141-
// 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);
142+
for (auto btn : utki::enum_iterable_v<decltype(win.mouse_button_state)::enum_type>){
144143
if (win.mouse_button_state.get(btn)) {
145144
win.mouse_button_state.clear(btn);
146145
constexpr auto outside_of_window_coordinate = 100000000;

0 commit comments

Comments
 (0)