Skip to content

Commit

Permalink
Fix dev warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurSonzogni committed Dec 29, 2024
1 parent 9f87637 commit 42f689c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions include/ftxui/dom/selection.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ class Selection {
private:
Selection(int start_x, int start_y, int end_x, int end_y, Selection* parent);

Selection* const parent_ = this;
const bool empty_ = true;
const int start_x_ = 0;
const int start_y_ = 0;
const int end_x_ = 0;
const int end_y_ = 0;
const Box box_ = {};
Selection* const parent_ = this;
const bool empty_ = true;
std::stringstream parts_;

// The position of the last inserted part.
Expand Down
3 changes: 2 additions & 1 deletion src/ftxui/dom/flexbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,8 @@ class Flexbox : public Node {
IsColumnOriented() ? selection_lines.SaturateHorizontal(box)
: selection_lines.SaturateVertical(box);

for (auto& block : line.blocks) {
for (auto& _: line.blocks) {
std::ignore = _;
children_[i]->Select(selection_line);
i++;
}
Expand Down
2 changes: 1 addition & 1 deletion src/ftxui/dom/selection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Unselectable : public NodeDecorator {
public:
using NodeDecorator::NodeDecorator;

void Select(Selection& selection) override {
void Select(Selection&) override {
// Overwrite the select method to do nothing.
}
};
Expand Down
2 changes: 1 addition & 1 deletion src/ftxui/dom/selection_style.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class SelectionStyleReset : public NodeDecorator {

void Render(Screen& screen) final {
auto old_style = screen.GetSelectionStyle();
screen.SetSelectionStyle([](Pixel& pixel) {});
screen.SetSelectionStyle([](Pixel&) {});
NodeDecorator::Render(screen);
screen.SetSelectionStyle(old_style);
}
Expand Down
1 change: 0 additions & 1 deletion src/ftxui/dom/text.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ class Text : public Node {
bool has_selection = false;
int selection_start_ = 0;
int selection_end_ = -1;
std::function<void(Pixel& pixel)> selectionTransform;
};

class VText : public Node {
Expand Down

0 comments on commit 42f689c

Please sign in to comment.