mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-21 14:40:48 +08:00
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.
This commit is contained in:
@@ -32,9 +32,9 @@ private:
|
|||||||
|
|
||||||
std::string InputFile;
|
std::string InputFile;
|
||||||
std::string OutputFile;
|
std::string OutputFile;
|
||||||
bool CopyOnly;
|
bool CopyOnly = false;
|
||||||
bool EscapeQuotes;
|
bool EscapeQuotes = false;
|
||||||
bool AtOnly;
|
bool AtOnly = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -46,7 +46,7 @@ protected:
|
|||||||
std::string BinaryDirectory;
|
std::string BinaryDirectory;
|
||||||
std::string OutputFile;
|
std::string OutputFile;
|
||||||
std::string FindErrorMessage;
|
std::string FindErrorMessage;
|
||||||
bool SrcFileSignature;
|
bool SrcFileSignature = false;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::vector<std::string> WarnCMP0067;
|
std::vector<std::string> WarnCMP0067;
|
||||||
|
@@ -27,7 +27,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
std::string Filename;
|
std::string Filename;
|
||||||
bool Append;
|
bool Append = false;
|
||||||
void ConstFinalPass() const;
|
void ConstFinalPass() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -62,7 +62,7 @@ protected:
|
|||||||
///! Contains the names of the global generators support by this generator.
|
///! Contains the names of the global generators support by this generator.
|
||||||
std::vector<std::string> SupportedGlobalGenerators;
|
std::vector<std::string> SupportedGlobalGenerators;
|
||||||
///! the global generator which creates the makefiles
|
///! the global generator which creates the makefiles
|
||||||
const cmGlobalGenerator* GlobalGenerator;
|
const cmGlobalGenerator* GlobalGenerator = nullptr;
|
||||||
|
|
||||||
std::string Name;
|
std::string Name;
|
||||||
};
|
};
|
||||||
|
@@ -48,7 +48,7 @@ protected:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
std::vector<std::string> FinalArgs;
|
std::vector<std::string> FinalArgs;
|
||||||
bool IsFilesForm;
|
bool IsFilesForm = false;
|
||||||
std::string Destination;
|
std::string Destination;
|
||||||
std::vector<std::string> Files;
|
std::vector<std::string> Files;
|
||||||
};
|
};
|
||||||
|
@@ -43,7 +43,7 @@ private:
|
|||||||
void LinkLibraryTypeSpecifierWarning(int left, int right);
|
void LinkLibraryTypeSpecifierWarning(int left, int right);
|
||||||
static const char* LinkLibraryTypeNames[3];
|
static const char* LinkLibraryTypeNames[3];
|
||||||
|
|
||||||
cmTarget* Target;
|
cmTarget* Target = nullptr;
|
||||||
enum ProcessingState
|
enum ProcessingState
|
||||||
{
|
{
|
||||||
ProcessingLinkLibraries,
|
ProcessingLinkLibraries,
|
||||||
@@ -55,7 +55,7 @@ private:
|
|||||||
ProcessingKeywordPrivateInterface
|
ProcessingKeywordPrivateInterface
|
||||||
};
|
};
|
||||||
|
|
||||||
ProcessingState CurrentProcessingState;
|
ProcessingState CurrentProcessingState = ProcessingLinkLibraries;
|
||||||
|
|
||||||
bool HandleLibrary(const std::string& lib, cmTargetLinkLibraryType llt);
|
bool HandleLibrary(const std::string& lib, cmTargetLinkLibraryType llt);
|
||||||
};
|
};
|
||||||
|
@@ -28,7 +28,7 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::string Property;
|
std::string Property;
|
||||||
cmTarget* Target;
|
cmTarget* Target = nullptr;
|
||||||
|
|
||||||
virtual void HandleInterfaceContent(cmTarget* tgt,
|
virtual void HandleInterfaceContent(cmTarget* tgt,
|
||||||
const std::vector<std::string>& content,
|
const std::vector<std::string>& content,
|
||||||
|
Reference in New Issue
Block a user