mirror of
				https://github.com/ArthurSonzogni/FTXUI.git
				synced 2025-11-04 13:38:14 +08:00 
			
		
		
		
	component/collapsible: drop unused member variable (#360)
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
This commit is contained in:
		@@ -29,7 +29,7 @@ Component Collapsible(ConstStringRef label, Component child, Ref<bool> show) {
 | 
				
			|||||||
  class Impl : public ComponentBase {
 | 
					  class Impl : public ComponentBase {
 | 
				
			||||||
   public:
 | 
					   public:
 | 
				
			||||||
    Impl(ConstStringRef label, Component child, Ref<bool> show)
 | 
					    Impl(ConstStringRef label, Component child, Ref<bool> show)
 | 
				
			||||||
        : label_(label), show_(std::move(show)) {
 | 
					        : show_(std::move(show)) {
 | 
				
			||||||
      CheckboxOption opt;
 | 
					      CheckboxOption opt;
 | 
				
			||||||
      opt.transform = [](EntryState s) {
 | 
					      opt.transform = [](EntryState s) {
 | 
				
			||||||
        auto prefix = text(s.state ? "▼ " : "▶ ");
 | 
					        auto prefix = text(s.state ? "▼ " : "▶ ");
 | 
				
			||||||
@@ -41,11 +41,10 @@ Component Collapsible(ConstStringRef label, Component child, Ref<bool> show) {
 | 
				
			|||||||
        return hbox({prefix, t});
 | 
					        return hbox({prefix, t});
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
      Add(Container::Vertical({
 | 
					      Add(Container::Vertical({
 | 
				
			||||||
          Checkbox(label_, show_.operator->(), opt),
 | 
					          Checkbox(label, show_.operator->(), opt),
 | 
				
			||||||
          Maybe(std::move(child), show_.operator->()),
 | 
					          Maybe(std::move(child), show_.operator->()),
 | 
				
			||||||
      }));
 | 
					      }));
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    ConstStringRef label_;
 | 
					 | 
				
			||||||
    Ref<bool> show_;
 | 
					    Ref<bool> show_;
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user