clang-tidy: use = default

Found with modernize-use-equals-default

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2021-02-28 18:58:44 -08:00 committed by Tomas Babej
parent 4aaaa8dcc8
commit 3cafb5257e
9 changed files with 7 additions and 50 deletions

View file

@ -49,21 +49,10 @@ A2::A2 (const std::string& raw, Lexer::Type lextype)
}
////////////////////////////////////////////////////////////////////////////////
A2::A2 (const A2& other)
: _lextype (other._lextype)
, _tags (other._tags)
, _attributes (other._attributes)
{
}
A2::A2 (const A2& other) = default;
////////////////////////////////////////////////////////////////////////////////
A2& A2::operator= (const A2& other)
{
_lextype = other._lextype;
_tags = other._tags;
_attributes = other._attributes;
return *this;
}
A2& A2::operator= (const A2& other) = default;
////////////////////////////////////////////////////////////////////////////////
bool A2::hasTag (const std::string& tag) const

View file

@ -49,11 +49,6 @@ Lexer::Lexer (const std::string& text)
{
}
////////////////////////////////////////////////////////////////////////////////
Lexer::~Lexer ()
{
}
////////////////////////////////////////////////////////////////////////////////
// When a Lexer object is constructed with a string, this method walks through
// the stream of low-level tokens.

View file

@ -54,7 +54,7 @@ public:
date, duration };
Lexer (const std::string&);
~Lexer ();
~Lexer () = default;
bool token (std::string&, Lexer::Type&);
static std::vector <std::string> split (const std::string&);
static std::string typeToString (Lexer::Type);

View file

@ -166,19 +166,7 @@ const std::string& Variant::source () const
}
////////////////////////////////////////////////////////////////////////////////
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;
}
Variant& Variant::operator= (const Variant& other) = default;
////////////////////////////////////////////////////////////////////////////////
bool Variant::operator&& (const Variant& other) const

View file

@ -238,11 +238,6 @@ Column::Column ()
{
}
////////////////////////////////////////////////////////////////////////////////
Column::~Column ()
{
}
////////////////////////////////////////////////////////////////////////////////
void Column::renderHeader (
std::vector <std::string>& lines,

View file

@ -41,7 +41,7 @@ public:
static Column* uda (const std::string&);
Column ();
virtual ~Column ();
virtual ~Column () = default;
const std::string& name () const { return _name; }
const std::string& style () const { return _style; }

View file

@ -124,7 +124,7 @@ public:
Chart (char);
Chart (const Chart&); // Unimplemented
Chart& operator= (const Chart&); // Unimplemented
~Chart ();
~Chart () = default;
void scan (std::vector <Task>&);
void scanForPeak (std::vector <Task>&);
@ -184,11 +184,6 @@ Chart::Chart (char type)
_period = type;
}
////////////////////////////////////////////////////////////////////////////////
Chart::~Chart ()
{
}
////////////////////////////////////////////////////////////////////////////////
// Scan all tasks, quantize the dates by day, and find the peak pending count
// and corresponding epoch.

View file

@ -235,11 +235,6 @@ Command::Command ()
{
}
////////////////////////////////////////////////////////////////////////////////
Command::~Command ()
{
}
////////////////////////////////////////////////////////////////////////////////
std::string Command::keyword () const
{

View file

@ -53,7 +53,7 @@ public:
};
Command ();
virtual ~Command ();
virtual ~Command () = default;
static void factory (std::map <std::string, Command*>&);