mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-28 16:29:34 +08:00
Pass -Wshadow (#97)
Requested from: https://github.com/robinlinden/hastur/pull/12
This commit is contained in:
@@ -13,22 +13,22 @@ namespace ftxui {
|
||||
class Reflect : public Node {
|
||||
public:
|
||||
Reflect(Element child, Box& box)
|
||||
: Node(unpack(std::move(child))), box_(box) {}
|
||||
: Node(unpack(std::move(child))), reflected_box_(box) {}
|
||||
~Reflect() override {}
|
||||
|
||||
void ComputeRequirement() final {
|
||||
Node::ComputeRequirement();
|
||||
requirement_ = children[0]->requirement();
|
||||
requirement_ = children_[0]->requirement();
|
||||
}
|
||||
|
||||
void SetBox(Box box) final {
|
||||
box_ = box;
|
||||
Node::SetBox(box_);
|
||||
children[0]->SetBox(box_);
|
||||
reflected_box_ = box;
|
||||
Node::SetBox(reflected_box_);
|
||||
children_[0]->SetBox(reflected_box_);
|
||||
}
|
||||
|
||||
private:
|
||||
Box& box_;
|
||||
Box& reflected_box_;
|
||||
};
|
||||
|
||||
Decorator reflect(Box& box) {
|
||||
|
Reference in New Issue
Block a user