Execute clang tidy and IWYU (#528)

This commit is contained in:
Arthur Sonzogni
2022-12-19 18:51:25 +01:00
committed by ArthurSonzogni
parent 4dc1a9fff9
commit 0542227ba7
55 changed files with 315 additions and 298 deletions

View File

@@ -32,10 +32,10 @@ class RadioboxBase : public ComponentBase {
Element Render() override {
Clamp();
Elements elements;
bool is_menu_focused = Focused();
const bool is_menu_focused = Focused();
for (int i = 0; i < size(); ++i) {
bool is_focused = (focused_entry() == i) && is_menu_focused;
bool is_selected = (hovered_ == i);
const bool is_focused = (focused_entry() == i) && is_menu_focused;
const bool is_selected = (hovered_ == i);
auto focus_management = !is_selected ? nothing
: is_menu_focused ? focus
: select;
@@ -66,7 +66,7 @@ class RadioboxBase : public ComponentBase {
}
if (Focused()) {
int old_hovered = hovered_;
const int old_hovered = hovered_;
if (event == Event::ArrowUp || event == Event::Character('k')) {
(hovered_)--;
}
@@ -141,7 +141,7 @@ class RadioboxBase : public ComponentBase {
return false;
}
int old_hovered = hovered_;
const int old_hovered = hovered_;
if (event.mouse().button == Mouse::WheelUp) {
(hovered_)--;