summaryrefslogtreecommitdiffstats
path: root/Source/cmLinkItem.h
diff options
context:
space:
mode:
authorRegina Pfeifer <regina@mailbox.org>2018-11-21 22:17:54 (GMT)
committerRegina Pfeifer <regina@mailbox.org>2018-12-15 09:52:37 (GMT)
commitb2aa3aedeab09ad7b2c95353d2d3c3d867bcec53 (patch)
tree44678a6866dac777b571e84aed52d62d286654cf /Source/cmLinkItem.h
parent32cb564bea57af007d03fa31d80a0177057fc901 (diff)
downloadCMake-b2aa3aedeab09ad7b2c95353d2d3c3d867bcec53.zip
CMake-b2aa3aedeab09ad7b2c95353d2d3c3d867bcec53.tar.gz
CMake-b2aa3aedeab09ad7b2c95353d2d3c3d867bcec53.tar.bz2
clang-tidy: Use default member initialization
Diffstat (limited to 'Source/cmLinkItem.h')
-rw-r--r--Source/cmLinkItem.h46
1 files changed, 15 insertions, 31 deletions
diff --git a/Source/cmLinkItem.h b/Source/cmLinkItem.h
index e1ddd22..b841509 100644
--- a/Source/cmLinkItem.h
+++ b/Source/cmLinkItem.h
@@ -27,7 +27,7 @@ public:
cmLinkItem(std::string const& s, cmListFileBacktrace const& bt);
cmLinkItem(cmGeneratorTarget const* t, cmListFileBacktrace const& bt);
std::string const& AsStr() const;
- cmGeneratorTarget const* Target;
+ cmGeneratorTarget const* Target = nullptr;
cmListFileBacktrace Backtrace;
friend bool operator<(cmLinkItem const& l, cmLinkItem const& r);
friend bool operator==(cmLinkItem const& l, cmLinkItem const& r);
@@ -39,7 +39,7 @@ class cmLinkImplItem : public cmLinkItem
public:
cmLinkImplItem();
cmLinkImplItem(cmLinkItem item, bool fromGenex);
- bool FromGenex;
+ bool FromGenex = false;
};
/** The link implementation specifies the direct library
@@ -70,36 +70,25 @@ struct cmLinkInterface : public cmLinkInterfaceLibraries
// Number of repetitions of a strongly connected component of two
// or more static libraries.
- unsigned int Multiplicity;
+ unsigned int Multiplicity = 0;
// Libraries listed for other configurations.
// Needed only for OLD behavior of CMP0003.
std::vector<cmLinkItem> WrongConfigLibraries;
- bool ImplementationIsInterface;
+ bool ImplementationIsInterface = false;
- cmLinkInterface()
- : Multiplicity(0)
- , ImplementationIsInterface(false)
- {
- }
+ cmLinkInterface() {}
};
struct cmOptionalLinkInterface : public cmLinkInterface
{
- cmOptionalLinkInterface()
- : LibrariesDone(false)
- , AllDone(false)
- , Exists(false)
- , HadHeadSensitiveCondition(false)
- , ExplicitLibraries(nullptr)
- {
- }
- bool LibrariesDone;
- bool AllDone;
- bool Exists;
- bool HadHeadSensitiveCondition;
- const char* ExplicitLibraries;
+ cmOptionalLinkInterface() {}
+ bool LibrariesDone = false;
+ bool AllDone = false;
+ bool Exists = false;
+ bool HadHeadSensitiveCondition = false;
+ const char* ExplicitLibraries = nullptr;
};
struct cmHeadToLinkInterfaceMap
@@ -116,15 +105,10 @@ struct cmLinkImplementation : public cmLinkImplementationLibraries
// Cache link implementation computation from each configuration.
struct cmOptionalLinkImplementation : public cmLinkImplementation
{
- cmOptionalLinkImplementation()
- : LibrariesDone(false)
- , LanguagesDone(false)
- , HadHeadSensitiveCondition(false)
- {
- }
- bool LibrariesDone;
- bool LanguagesDone;
- bool HadHeadSensitiveCondition;
+ cmOptionalLinkImplementation() {}
+ bool LibrariesDone = false;
+ bool LanguagesDone = false;
+ bool HadHeadSensitiveCondition = false;
};
/** Compute the link type to use for the given configuration. */