From 0137d2a9ac1185c8b388476a07cd94442d55a4d0 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sun, 20 Mar 2022 23:04:42 +0800 Subject: [PATCH] component/collapsible: drop unused member variable (#360) Signed-off-by: Kefu Chai --- src/ftxui/component/collapsible.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/ftxui/component/collapsible.cpp b/src/ftxui/component/collapsible.cpp index 1dec4021..ad4b159a 100644 --- a/src/ftxui/component/collapsible.cpp +++ b/src/ftxui/component/collapsible.cpp @@ -29,7 +29,7 @@ Component Collapsible(ConstStringRef label, Component child, Ref show) { class Impl : public ComponentBase { public: Impl(ConstStringRef label, Component child, Ref show) - : label_(label), show_(std::move(show)) { + : show_(std::move(show)) { CheckboxOption opt; opt.transform = [](EntryState s) { auto prefix = text(s.state ? "▼ " : "▶ "); @@ -41,11 +41,10 @@ Component Collapsible(ConstStringRef label, Component child, Ref show) { return hbox({prefix, t}); }; Add(Container::Vertical({ - Checkbox(label_, show_.operator->(), opt), + Checkbox(label, show_.operator->(), opt), Maybe(std::move(child), show_.operator->()), })); } - ConstStringRef label_; Ref show_; };