ソースを参照

cmLocalGenerator: De-duplicate StateSnapshot member

We have the member from the cmOutputConverter parent.
Brad King 4 年 前
コミット
013ec595c8
3 ファイル変更3 行追加4 行削除
  1. 0 1
      Source/cmLocalGenerator.cxx
  2. 0 1
      Source/cmLocalGenerator.h
  3. 3 2
      Source/cmOutputConverter.h

+ 0 - 1
Source/cmLocalGenerator.cxx

@@ -88,7 +88,6 @@ static auto ruleReplaceVars = { "CMAKE_${LANG}_COMPILER",
 
 cmLocalGenerator::cmLocalGenerator(cmGlobalGenerator* gg, cmMakefile* makefile)
   : cmOutputConverter(makefile->GetStateSnapshot())
-  , StateSnapshot(makefile->GetStateSnapshot())
   , DirectoryBacktrace(makefile->GetBacktrace())
 {
   this->GlobalGenerator = gg;

+ 0 - 1
Source/cmLocalGenerator.h

@@ -594,7 +594,6 @@ protected:
   virtual bool CheckDefinition(std::string const& define) const;
 
   cmMakefile* Makefile;
-  cmStateSnapshot StateSnapshot;
   cmListFileBacktrace DirectoryBacktrace;
   cmGlobalGenerator* GlobalGenerator;
   std::map<std::string, std::string> UniqueObjectNamesMap;

+ 3 - 2
Source/cmOutputConverter.h

@@ -102,6 +102,9 @@ public:
   };
   static FortranPreprocess GetFortranPreprocess(cm::string_view value);
 
+protected:
+  cmStateSnapshot StateSnapshot;
+
 private:
   cmState* GetState() const;
 
@@ -111,7 +114,5 @@ private:
   static bool Shell_ArgumentNeedsQuotes(cm::string_view in, int flags);
   static std::string Shell_GetArgument(cm::string_view in, int flags);
 
-  cmStateSnapshot StateSnapshot;
-
   bool LinkScriptShell;
 };