1
0
Эх сурвалжийг харах

cmCTest: Add missing const

Brad King 1 жил өмнө
parent
commit
67dc003467

+ 2 - 2
Source/cmCTest.cxx

@@ -1706,7 +1706,7 @@ bool cmCTest::SubmitExtraFiles(const std::string& cfiles)
 
 // for a -D argument convert the next argument into
 // the proper list of dashboard steps via SetTest
-bool cmCTest::AddTestsForDashboardType(std::string& targ)
+bool cmCTest::AddTestsForDashboardType(std::string const& targ)
 {
   if (targ == "Experimental") {
     this->SetTestModel(cmCTest::EXPERIMENTAL);
@@ -1829,7 +1829,7 @@ bool cmCTest::AddTestsForDashboardType(std::string& targ)
   return true;
 }
 
-void cmCTest::ErrorMessageUnknownDashDValue(std::string& val)
+void cmCTest::ErrorMessageUnknownDashDValue(std::string const& val)
 {
   cmCTestLog(this, ERROR_MESSAGE,
              "CTest -D called with incorrect option: " << val << '\n');

+ 2 - 2
Source/cmCTest.h

@@ -481,10 +481,10 @@ private:
   int Initialize(const std::string& binary_dir, cmCTestStartCommand* command);
 
   /** parse the option after -D and convert it into the appropriate steps */
-  bool AddTestsForDashboardType(std::string& targ);
+  bool AddTestsForDashboardType(std::string const& targ);
 
   /** read as "emit an error message for an unknown -D value" */
-  void ErrorMessageUnknownDashDValue(std::string& val);
+  void ErrorMessageUnknownDashDValue(std::string const& val);
 
   /** add a variable definition from a command line -D value */
   bool AddVariableDefinition(const std::string& arg);