mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-17 00:18:11 +08:00
Fix clang-tidy. (#469)
This commit is contained in:
@@ -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.
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -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_;
|
||||
|
Reference in New Issue
Block a user