clang-tidy: Use default member initialization

This commit is contained in:
Regina Pfeifer
2018-11-21 23:17:54 +01:00
parent 32cb564bea
commit b2aa3aedea
62 changed files with 152 additions and 347 deletions

View File

@@ -33,11 +33,8 @@ struct cmCommandContext
cmCommandName(std::string const& name) { *this = name; }
cmCommandName& operator=(std::string const& name);
} Name;
long Line;
cmCommandContext()
: Line(0)
{
}
long Line = 0;
cmCommandContext() {}
cmCommandContext(const char* name, int line)
: Name(name)
, Line(line)
@@ -53,11 +50,7 @@ struct cmListFileArgument
Quoted,
Bracket
};
cmListFileArgument()
: Delim(Unquoted)
, Line(0)
{
}
cmListFileArgument() {}
cmListFileArgument(const std::string& v, Delimiter d, long line)
: Value(v)
, Delim(d)
@@ -70,8 +63,8 @@ struct cmListFileArgument
}
bool operator!=(const cmListFileArgument& r) const { return !(*this == r); }
std::string Value;
Delimiter Delim;
long Line;
Delimiter Delim = Unquoted;
long Line = 0;
};
class cmListFileContext
@@ -79,11 +72,8 @@ class cmListFileContext
public:
std::string Name;
std::string FilePath;
long Line;
cmListFileContext()
: Line(0)
{
}
long Line = 0;
cmListFileContext() {}
static cmListFileContext FromCommandContext(cmCommandContext const& lfcc,
std::string const& fileName)