Refactor: cmStandardLevelResolver::ComputeFeaturesAvailable returns cmProp

This commit is contained in:
Marc Chevrier
2021-08-12 19:17:35 +02:00
parent 3fc3b43933
commit 361b1ea4c7
3 changed files with 6 additions and 6 deletions

View File

@@ -1777,7 +1777,7 @@ static const struct CompileFeaturesNode : public cmGeneratorExpressionNode
testedFeatures[lang].push_back(p);
if (availableFeatures.find(lang) == availableFeatures.end()) {
const char* featuresKnown =
cmProp featuresKnown =
standardResolver.CompileFeaturesAvailable(lang, &error);
if (!featuresKnown) {
reportError(context, content->GetOriginalExpression(), error);

View File

@@ -393,7 +393,7 @@ bool cmStandardLevelResolver::CheckCompileFeaturesAvailable(
return true;
}
const char* features = this->CompileFeaturesAvailable(lang, error);
cmProp features = this->CompileFeaturesAvailable(lang, error);
if (!features) {
return false;
}
@@ -471,7 +471,7 @@ bool cmStandardLevelResolver::CompileFeatureKnown(
return false;
}
const char* cmStandardLevelResolver::CompileFeaturesAvailable(
cmProp cmStandardLevelResolver::CompileFeaturesAvailable(
const std::string& lang, std::string* error) const
{
if (!this->Makefile->GetGlobalGenerator()->GetLanguageEnabled(lang)) {
@@ -513,7 +513,7 @@ const char* cmStandardLevelResolver::CompileFeaturesAvailable(
}
return nullptr;
}
return cmToCStr(featuresKnown);
return featuresKnown;
}
bool cmStandardLevelResolver::GetNewRequiredStandard(

View File

@@ -30,8 +30,8 @@ public:
const std::string& feature, std::string& lang,
std::string* error) const;
const char* CompileFeaturesAvailable(const std::string& lang,
std::string* error) const;
cmProp CompileFeaturesAvailable(const std::string& lang,
std::string* error) const;
bool GetNewRequiredStandard(const std::string& targetName,
const std::string& feature,