Remove explicit default destructors (#157)

From CppCoreGuidelines:

Rule of Zero: C.20: If you can avoid defining default operations, do.
C.52: Use inheriting constructors to import constructors into a derived class that does not need further explicit initialization.
DRY forward and using declarations.
Miscellaneous:

Fix format.sh to output examples with normalised paths in sorted order.

Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
This commit is contained in:
Tushar Maheshwari
2021-07-17 15:32:08 +05:30
committed by GitHub
parent b3a333b417
commit 21d746e858
38 changed files with 67 additions and 125 deletions

View File

@@ -15,8 +15,7 @@ using ftxui::Screen;
class Text : public Node {
public:
Text(std::wstring text) : Node(), text_(text) {}
~Text() {}
Text(std::wstring text) : text_(text) {}
void ComputeRequirement() override {
requirement_.min_x = wstring_width(text_);
@@ -47,11 +46,10 @@ class Text : public Node {
class VText : public Node {
public:
VText(std::wstring text) : Node(), text_(text) {
VText(std::wstring text) : text_(text) {
for (auto& c : text_)
width_ = std::max(width_, wchar_width(c));
}
~VText() {}
void ComputeRequirement() override {
requirement_.min_x = width_;