From ead50d4d6e1022dbcf5efe46b83d2afb377051be Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 5 Dec 2020 16:18:15 -0500 Subject: [PATCH] Revert "[clang-tidy] Use default to initialize constructors" This reverts commit bf40ea881662804e16a6db581bdf70bb04df287c. --- src/CLI2.cpp | 15 +++++++++++++-- src/Lexer.cpp | 4 +++- src/Variant.cpp | 14 +++++++++++++- 3 files changed, 29 insertions(+), 4 deletions(-) diff --git a/src/CLI2.cpp b/src/CLI2.cpp index bb86cb5bf..a6560fded 100644 --- a/src/CLI2.cpp +++ b/src/CLI2.cpp @@ -49,10 +49,21 @@ A2::A2 (const std::string& raw, Lexer::Type lextype) } //////////////////////////////////////////////////////////////////////////////// -A2::A2 (const A2& other) = default; +A2::A2 (const A2& other) +: _lextype (other._lextype) +, _tags (other._tags) +, _attributes (other._attributes) +{ +} //////////////////////////////////////////////////////////////////////////////// -A2& A2::operator= (const A2& other) = default; +A2& A2::operator= (const A2& other) +{ + _lextype = other._lextype; + _tags = other._tags; + _attributes = other._attributes; + return *this; +} //////////////////////////////////////////////////////////////////////////////// bool A2::hasTag (const std::string& tag) const diff --git a/src/Lexer.cpp b/src/Lexer.cpp index 39e8866d6..703681e68 100644 --- a/src/Lexer.cpp +++ b/src/Lexer.cpp @@ -50,7 +50,9 @@ Lexer::Lexer (const std::string& text) } //////////////////////////////////////////////////////////////////////////////// -Lexer::~Lexer () = default; +Lexer::~Lexer () +{ +} //////////////////////////////////////////////////////////////////////////////// // When a Lexer object is constructed with a string, this method walks through diff --git a/src/Variant.cpp b/src/Variant.cpp index d0afa4234..133320f55 100644 --- a/src/Variant.cpp +++ b/src/Variant.cpp @@ -166,7 +166,19 @@ const std::string& Variant::source () const } //////////////////////////////////////////////////////////////////////////////// -Variant& Variant::operator= (const Variant& other) = default; +Variant& Variant::operator= (const Variant& other) +{ + _type = other._type; + _bool = other._bool; + _integer = other._integer; + _real = other._real; + _string = other._string; + _date = other._date; + _duration = other._duration; + _source = other._source; + + return *this; +} //////////////////////////////////////////////////////////////////////////////// bool Variant::operator&& (const Variant& other) const