Selaa lähdekoodia

cmGlobalVisualStudio10Generator: Remove redundant arguments

Brad King 4 vuotta sitten
vanhempi
sitoutus
99f6f1b3b9

+ 13 - 29
Source/cmGlobalVisualStudio10Generator.cxx

@@ -1366,8 +1366,8 @@ static std::string cmGetFlagTableName(std::string const& toolsetName,
 }
 
 cmIDEFlagTable const* cmGlobalVisualStudio10Generator::LoadFlagTable(
-  std::string const& optionsName, std::string const& toolsetName,
-  std::string const& defaultName, std::string const& table) const
+  std::string const& optionsName, std::string const& defaultName,
+  std::string const& table) const
 {
   cmIDEFlagTable const* ret = nullptr;
 
@@ -1376,6 +1376,8 @@ cmIDEFlagTable const* cmGlobalVisualStudio10Generator::LoadFlagTable(
     filename = cmGetFlagTableName(optionsName, table);
     ret = cmLoadFlagTableJson(filename);
   } else {
+    std::string const& toolsetName =
+      this->CanonicalToolsetName(this->GetPlatformToolsetString());
     filename = cmGetFlagTableName(toolsetName, table);
     if (cmSystemTools::FileExists(filename)) {
       ret = cmLoadFlagTableJson(filename);
@@ -1401,90 +1403,72 @@ cmIDEFlagTable const* cmGlobalVisualStudio10Generator::LoadFlagTable(
 cmIDEFlagTable const* cmGlobalVisualStudio10Generator::GetClFlagTable() const
 {
   std::string optionsName = this->GetClFlagTableName();
-  std::string toolsetName =
-    this->CanonicalToolsetName(this->GetPlatformToolsetString());
   std::string defaultName =
     this->CanonicalToolsetName(this->DefaultCLFlagTableName);
-  return LoadFlagTable(optionsName, toolsetName, defaultName, "CL");
+  return LoadFlagTable(optionsName, defaultName, "CL");
 }
 
 cmIDEFlagTable const* cmGlobalVisualStudio10Generator::GetCSharpFlagTable()
   const
 {
   std::string optionsName = this->GetCSharpFlagTableName();
-  std::string toolsetName =
-    this->CanonicalToolsetName(this->GetPlatformToolsetString());
   std::string defaultName =
     this->CanonicalToolsetName(this->DefaultCSharpFlagTableName);
-  return LoadFlagTable(optionsName, toolsetName, defaultName, "CSharp");
+  return LoadFlagTable(optionsName, defaultName, "CSharp");
 }
 
 cmIDEFlagTable const* cmGlobalVisualStudio10Generator::GetRcFlagTable() const
 {
   std::string optionsName = this->GetRcFlagTableName();
-  std::string toolsetName =
-    this->CanonicalToolsetName(this->GetPlatformToolsetString());
   std::string defaultName =
     this->CanonicalToolsetName(this->DefaultRCFlagTableName);
-  return LoadFlagTable(optionsName, toolsetName, defaultName, "RC");
+  return LoadFlagTable(optionsName, defaultName, "RC");
 }
 
 cmIDEFlagTable const* cmGlobalVisualStudio10Generator::GetLibFlagTable() const
 {
   std::string optionsName = this->GetLibFlagTableName();
-  std::string toolsetName =
-    this->CanonicalToolsetName(this->GetPlatformToolsetString());
   std::string defaultName =
     this->CanonicalToolsetName(this->DefaultLibFlagTableName);
-  return LoadFlagTable(optionsName, toolsetName, defaultName, "LIB");
+  return LoadFlagTable(optionsName, defaultName, "LIB");
 }
 
 cmIDEFlagTable const* cmGlobalVisualStudio10Generator::GetLinkFlagTable() const
 {
   std::string optionsName = this->GetLinkFlagTableName();
-  std::string toolsetName =
-    this->CanonicalToolsetName(this->GetPlatformToolsetString());
   std::string defaultName =
     this->CanonicalToolsetName(this->DefaultLinkFlagTableName);
-  return LoadFlagTable(optionsName, toolsetName, defaultName, "Link");
+  return LoadFlagTable(optionsName, defaultName, "Link");
 }
 
 cmIDEFlagTable const* cmGlobalVisualStudio10Generator::GetCudaFlagTable() const
 {
-  std::string toolsetName =
-    this->CanonicalToolsetName(this->GetPlatformToolsetString());
   std::string defaultName =
     this->CanonicalToolsetName(this->DefaultCudaFlagTableName);
-  return LoadFlagTable("", toolsetName, defaultName, "Cuda");
+  return LoadFlagTable("", defaultName, "Cuda");
 }
 
 cmIDEFlagTable const* cmGlobalVisualStudio10Generator::GetCudaHostFlagTable()
   const
 {
-  std::string toolsetName =
-    this->CanonicalToolsetName(this->GetPlatformToolsetString());
   std::string defaultName =
     this->CanonicalToolsetName(this->DefaultCudaHostFlagTableName);
-  return LoadFlagTable("", toolsetName, defaultName, "CudaHost");
+  return LoadFlagTable("", defaultName, "CudaHost");
 }
 
 cmIDEFlagTable const* cmGlobalVisualStudio10Generator::GetMasmFlagTable() const
 {
   std::string optionsName = this->GetMasmFlagTableName();
-  std::string toolsetName =
-    this->CanonicalToolsetName(this->GetPlatformToolsetString());
   std::string defaultName =
     this->CanonicalToolsetName(this->DefaultMasmFlagTableName);
-  return LoadFlagTable(optionsName, toolsetName, defaultName, "MASM");
+  return LoadFlagTable(optionsName, defaultName, "MASM");
 }
 
 cmIDEFlagTable const* cmGlobalVisualStudio10Generator::GetNasmFlagTable() const
 {
-  std::string toolsetName =
-    this->CanonicalToolsetName(this->GetPlatformToolsetString());
   std::string defaultName =
     this->CanonicalToolsetName(this->DefaultNasmFlagTableName);
-  return LoadFlagTable("", toolsetName, defaultName, "NASM");
+  return LoadFlagTable("", defaultName, "NASM");
 }
 
 std::string cmGlobalVisualStudio10Generator::GetClFlagTableName() const

+ 0 - 1
Source/cmGlobalVisualStudio10Generator.h

@@ -170,7 +170,6 @@ protected:
   std::string const& GetMSBuildCommand();
 
   cmIDEFlagTable const* LoadFlagTable(std::string const& optionsName,
-                                      std::string const& toolsetName,
                                       std::string const& defaultName,
                                       std::string const& table) const;