summaryrefslogtreecommitdiffstats
path: root/Source/cmTargetLinkLibrariesCommand.h
diff options
context:
space:
mode:
authorjrp2014 <jrp2014@users.noreply.github.com>2018-04-03 21:18:48 (GMT)
committerBrad King <brad.king@kitware.com>2018-04-05 17:42:48 (GMT)
commitb0676cc5d48a5e7b79e8c95545b464b67248d96e (patch)
tree92da25087976acdfc872cb949338ec894c3bfb0e /Source/cmTargetLinkLibrariesCommand.h
parent966dba5b683149e8c42d35a89cd60d593e542593 (diff)
downloadCMake-b0676cc5d48a5e7b79e8c95545b464b67248d96e.zip
CMake-b0676cc5d48a5e7b79e8c95545b464b67248d96e.tar.gz
CMake-b0676cc5d48a5e7b79e8c95545b464b67248d96e.tar.bz2
Add in-class initialization of some members
Several class constructors leave members uninitialized. The members are initialized before use in methods, but it is clearer and less error-prone to initialize them at their definition site.
Diffstat (limited to 'Source/cmTargetLinkLibrariesCommand.h')
-rw-r--r--Source/cmTargetLinkLibrariesCommand.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmTargetLinkLibrariesCommand.h b/Source/cmTargetLinkLibrariesCommand.h
index a2f3ecd..54f8cf4 100644
--- a/Source/cmTargetLinkLibrariesCommand.h
+++ b/Source/cmTargetLinkLibrariesCommand.h
@@ -43,7 +43,7 @@ private:
void LinkLibraryTypeSpecifierWarning(int left, int right);
static const char* LinkLibraryTypeNames[3];
- cmTarget* Target;
+ cmTarget* Target = nullptr;
enum ProcessingState
{
ProcessingLinkLibraries,
@@ -55,7 +55,7 @@ private:
ProcessingKeywordPrivateInterface
};
- ProcessingState CurrentProcessingState;
+ ProcessingState CurrentProcessingState = ProcessingLinkLibraries;
bool HandleLibrary(const std::string& lib, cmTargetLinkLibraryType llt);
};