ソースを参照

cmFindBase: Use in-class member initialization

Sylvain Joubert 5 年 前
コミット
cc070e66cd
2 ファイル変更4 行追加8 行削除
  1. 0 4
      Source/cmFindBase.cxx
  2. 4 4
      Source/cmFindBase.h

+ 0 - 4
Source/cmFindBase.cxx

@@ -22,10 +22,6 @@ class cmExecutionStatus;
 cmFindBase::cmFindBase(cmExecutionStatus& status)
   : cmFindCommon(status)
 {
-  this->AlreadyInCache = false;
-  this->AlreadyInCacheWithoutMetaInfo = false;
-  this->NamesPerDir = false;
-  this->NamesPerDirAllowed = false;
 }
 
 bool cmFindBase::ParseArguments(std::vector<std::string> const& argsIn)

+ 4 - 4
Source/cmFindBase.h

@@ -44,14 +44,14 @@ protected:
   std::string VariableDocumentation;
   std::string VariableName;
   std::vector<std::string> Names;
-  bool NamesPerDir;
-  bool NamesPerDirAllowed;
+  bool NamesPerDir = false;
+  bool NamesPerDirAllowed = false;
 
   // CMAKE_*_PATH CMAKE_SYSTEM_*_PATH FRAMEWORK|LIBRARY|INCLUDE|PROGRAM
   std::string EnvironmentPath; // LIB,INCLUDE
 
-  bool AlreadyInCache;
-  bool AlreadyInCacheWithoutMetaInfo;
+  bool AlreadyInCache = false;
+  bool AlreadyInCacheWithoutMetaInfo = false;
 
 private:
   // Add pieces of the search.