mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-20 04:13:07 +02:00
[clang-tidy] Use default to initialize constructors
Found with modernize-use-equals-default Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
897759e4dc
commit
bf40ea8816
3 changed files with 4 additions and 29 deletions
15
src/CLI2.cpp
15
src/CLI2.cpp
|
@ -49,21 +49,10 @@ A2::A2 (const std::string& raw, Lexer::Type lextype)
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
A2::A2 (const A2& other)
|
A2::A2 (const A2& other) = default;
|
||||||
: _lextype (other._lextype)
|
|
||||||
, _tags (other._tags)
|
|
||||||
, _attributes (other._attributes)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
A2& A2::operator= (const A2& other)
|
A2& A2::operator= (const A2& other) = default;
|
||||||
{
|
|
||||||
_lextype = other._lextype;
|
|
||||||
_tags = other._tags;
|
|
||||||
_attributes = other._attributes;
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
bool A2::hasTag (const std::string& tag) const
|
bool A2::hasTag (const std::string& tag) const
|
||||||
|
|
|
@ -50,9 +50,7 @@ Lexer::Lexer (const std::string& text)
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
Lexer::~Lexer ()
|
Lexer::~Lexer () = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// When a Lexer object is constructed with a string, this method walks through
|
// When a Lexer object is constructed with a string, this method walks through
|
||||||
|
|
|
@ -166,19 +166,7 @@ const std::string& Variant::source () const
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
Variant& Variant::operator= (const Variant& other)
|
Variant& Variant::operator= (const Variant& other) = default;
|
||||||
{
|
|
||||||
_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
|
bool Variant::operator&& (const Variant& other) const
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue