Fix clang-tidy. (#469)

This commit is contained in:
Arthur Sonzogni
2022-08-28 21:30:01 +02:00
committed by GitHub
parent 1e381fcad6
commit 8226c5aea7
7 changed files with 19 additions and 18 deletions

View File

@@ -164,7 +164,11 @@ ButtonOption ButtonOption::Animated(Color color) {
/// @brief Create a ButtonOption, using animated colors.
// static
ButtonOption ButtonOption::Animated(Color background, Color foreground) {
return ButtonOption::Animated(background, foreground, foreground, background);
return ButtonOption::Animated(
/*bakground=*/background,
/*foreground=*/foreground,
/*background_active=*/foreground,
/*foreground_active=*/background);
}
/// @brief Create a ButtonOption, using animated colors.

View File

@@ -19,7 +19,6 @@ Component Modal(Component main, Component modal, const bool* show_modal) {
: main_(std::move(main)),
modal_(std::move(modal)),
show_modal_(show_modal) {
selector_ = *show_modal_;
Add(Container::Tab({main_, modal_}, &selector_));
}
@@ -44,7 +43,7 @@ Component Modal(Component main, Component modal, const bool* show_modal) {
Component main_;
Component modal_;
const bool* show_modal_;
int selector_ = 0;
int selector_ = *show_modal_;
};
return Make<Impl>(main, modal, show_modal);
}

View File

@@ -28,7 +28,6 @@ class RadioboxBase : public ComponentBase {
int* selected,
Ref<RadioboxOption> option)
: entries_(entries), selected_(selected), option_(std::move(option)) {
hovered_ = *selected_;
}
private:
@@ -175,7 +174,7 @@ class RadioboxBase : public ComponentBase {
ConstStringListRef entries_;
int* selected_;
int hovered_;
int hovered_ = *selected_;
std::vector<Box> boxes_;
Box box_;
Ref<RadioboxOption> option_;