From c86bd1497c69da09fd1c2837e2fa660968be357c Mon Sep 17 00:00:00 2001 From: ArthurSonzogni Date: Mon, 30 Sep 2024 23:16:45 +0200 Subject: [PATCH] Fix comment. --- src/ftxui/component/checkbox.cpp | 6 +----- src/ftxui/component/component.cpp | 2 +- src/ftxui/component/radiobox.cpp | 6 +----- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/ftxui/component/checkbox.cpp b/src/ftxui/component/checkbox.cpp index 5ac7a7ad..b4b7f158 100644 --- a/src/ftxui/component/checkbox.cpp +++ b/src/ftxui/component/checkbox.cpp @@ -28,11 +28,7 @@ class CheckboxBase : public ComponentBase, public CheckboxOption { const bool is_active = Active(); auto focus_management = is_focused ? focus : is_active ? select : nothing; auto entry_state = EntryState{ - *label, - *checked, - is_active, - is_focused || hovered_, - -1, + *label, *checked, is_active, is_focused || hovered_, -1, }; auto element = (transform ? transform : CheckboxOption::Simple().transform)( entry_state); diff --git a/src/ftxui/component/component.cpp b/src/ftxui/component/component.cpp index 327426e2..e0c38dd4 100644 --- a/src/ftxui/component/component.cpp +++ b/src/ftxui/component/component.cpp @@ -51,7 +51,7 @@ size_t ComponentBase::ChildCount() const { return children_.size(); } -/// @brief Return index of child or -1 if not found. +/// @brief Return index of the component in its parent. -1 if no parent. /// @ingroup component int ComponentBase::Index() const { if (parent_ == nullptr) { diff --git a/src/ftxui/component/radiobox.cpp b/src/ftxui/component/radiobox.cpp index 17b78588..4c823ded 100644 --- a/src/ftxui/component/radiobox.cpp +++ b/src/ftxui/component/radiobox.cpp @@ -40,11 +40,7 @@ class RadioboxBase : public ComponentBase, public RadioboxOption { : is_menu_focused ? focus : select; auto state = EntryState{ - entries[i], - selected() == i, - is_selected, - is_focused, - i, + entries[i], selected() == i, is_selected, is_focused, i, }; auto element = (transform ? transform : RadioboxOption::Simple().transform)(state);