Преглед на файлове

cmGeneratorExpressionInterpreter::Evaluate: remove const char* overload

Vitaly Stakhovsky преди 5 години
родител
ревизия
43f7b17816
променени са 3 файла, в които са добавени 3 реда и са изтрити 13 реда
  1. 0 6
      Source/cmGeneratorExpression.cxx
  2. 0 2
      Source/cmGeneratorExpression.h
  3. 3 5
      Source/cmGeneratorTarget.cxx

+ 0 - 6
Source/cmGeneratorExpression.cxx

@@ -406,9 +406,3 @@ const std::string& cmGeneratorExpressionInterpreter::Evaluate(
     this->LocalGenerator, this->Config, this->HeadTarget, &dagChecker, nullptr,
     this->LocalGenerator, this->Config, this->HeadTarget, &dagChecker, nullptr,
     this->Language);
     this->Language);
 }
 }
-
-const std::string& cmGeneratorExpressionInterpreter::Evaluate(
-  const char* expression, const std::string& property)
-{
-  return this->Evaluate(std::string(expression ? expression : ""), property);
-}

+ 0 - 2
Source/cmGeneratorExpression.h

@@ -199,8 +199,6 @@ public:
 
 
   const std::string& Evaluate(std::string expression,
   const std::string& Evaluate(std::string expression,
                               const std::string& property);
                               const std::string& property);
-  const std::string& Evaluate(const char* expression,
-                              const std::string& property);
 
 
 protected:
 protected:
   cmGeneratorExpression GeneratorExpression;
   cmGeneratorExpression GeneratorExpression;

+ 3 - 5
Source/cmGeneratorTarget.cxx

@@ -5411,8 +5411,7 @@ bool getTypedProperty<bool>(cmGeneratorTarget const* tgt,
   }
   }
 
 
   cmProp value = tgt->GetProperty(prop);
   cmProp value = tgt->GetProperty(prop);
-  return cmIsOn(
-    genexInterpreter->Evaluate(value ? value->c_str() : nullptr, prop));
+  return cmIsOn(genexInterpreter->Evaluate(value ? *value : "", prop));
 }
 }
 
 
 template <>
 template <>
@@ -5426,8 +5425,7 @@ const char* getTypedProperty<const char*>(
     return value ? value->c_str() : nullptr;
     return value ? value->c_str() : nullptr;
   }
   }
 
 
-  return genexInterpreter->Evaluate(value ? value->c_str() : nullptr, prop)
-    .c_str();
+  return genexInterpreter->Evaluate(value ? *value : "", prop).c_str();
 }
 }
 
 
 template <>
 template <>
@@ -5441,7 +5439,7 @@ std::string getTypedProperty<std::string>(
     return valueAsString(value ? value->c_str() : nullptr);
     return valueAsString(value ? value->c_str() : nullptr);
   }
   }
 
 
-  return genexInterpreter->Evaluate(value ? value->c_str() : nullptr, prop);
+  return genexInterpreter->Evaluate(value ? *value : "", prop);
 }
 }
 
 
 template <typename PropertyType>
 template <typename PropertyType>