diff --git a/include/ftxui/dom/selection.hpp b/include/ftxui/dom/selection.hpp index 3ec0e4821f14133e2727621e457972067e6bee91..912d9e447529a9f00b8ce2caa075d9b90a451c9f 100644 --- a/include/ftxui/dom/selection.hpp +++ b/include/ftxui/dom/selection.hpp @@ -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. diff --git a/src/ftxui/dom/selection.cpp b/src/ftxui/dom/selection.cpp index 6c7f508dda9e9e79a12c4d9a092597b6fa8e9891..feb60b07d75fc75f7fe5cf0cef7d9a0c1b7365aa 100644 --- a/src/ftxui/dom/selection.cpp +++ b/src/ftxui/dom/selection.cpp @@ -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. } }; diff --git a/src/ftxui/dom/selection_style.cpp b/src/ftxui/dom/selection_style.cpp index c864a79d1ac51f51223dc3e9c65bfcf322bdde99..6ee95f79da53f06ea6ee0eac6776006425bec92c 100644 --- a/src/ftxui/dom/selection_style.cpp +++ b/src/ftxui/dom/selection_style.cpp @@ -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); } diff --git a/src/ftxui/dom/text.cpp b/src/ftxui/dom/text.cpp index c416c9766bbc2f9ac81f95ab498f48710589d23e..b6b534a1e4809b31cb078c945a45f1280e81a19a 100644 --- a/src/ftxui/dom/text.cpp +++ b/src/ftxui/dom/text.cpp @@ -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 {