diff options
author | Regina Pfeifer <regina@mailbox.org> | 2018-11-21 22:17:54 (GMT) |
---|---|---|
committer | Regina Pfeifer <regina@mailbox.org> | 2018-12-15 09:52:37 (GMT) |
commit | b2aa3aedeab09ad7b2c95353d2d3c3d867bcec53 (patch) | |
tree | 44678a6866dac777b571e84aed52d62d286654cf /Source/cmListFileCache.h | |
parent | 32cb564bea57af007d03fa31d80a0177057fc901 (diff) | |
download | CMake-b2aa3aedeab09ad7b2c95353d2d3c3d867bcec53.zip CMake-b2aa3aedeab09ad7b2c95353d2d3c3d867bcec53.tar.gz CMake-b2aa3aedeab09ad7b2c95353d2d3c3d867bcec53.tar.bz2 |
clang-tidy: Use default member initialization
Diffstat (limited to 'Source/cmListFileCache.h')
-rw-r--r-- | Source/cmListFileCache.h | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h index 95b55a0..4a247ba 100644 --- a/Source/cmListFileCache.h +++ b/Source/cmListFileCache.h @@ -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) |