summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalXCodeGenerator.cxx
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2020-04-30 14:00:00 (GMT)
committerBrad King <brad.king@kitware.com>2020-04-30 14:27:16 (GMT)
commit53675adbcf2f485d68c45e53d28baf6db220264c (patch)
tree8d0d761714de6f0a8f7c512f1af05e2f6bde493b /Source/cmGlobalXCodeGenerator.cxx
parentc09efe074d793203ab846e97bde8d03e4714dc2a (diff)
downloadCMake-53675adbcf2f485d68c45e53d28baf6db220264c.zip
CMake-53675adbcf2f485d68c45e53d28baf6db220264c.tar.gz
CMake-53675adbcf2f485d68c45e53d28baf6db220264c.tar.bz2
GetSafeProperty: return std::string const&
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 77fa6fa..cda3338 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -808,7 +808,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeSourceFile(
// Add flags from target and source file properties.
std::string flags;
- const std::string srcfmt = sf->GetSafeProperty("Fortran_FORMAT");
+ std::string const& srcfmt = sf->GetSafeProperty("Fortran_FORMAT");
switch (cmOutputConverter::GetFortranFormat(srcfmt)) {
case cmOutputConverter::FortranFormatFixed:
flags = "-fixed " + flags;
@@ -2289,7 +2289,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt,
// Add Fortran source format attribute if property is set.
const char* format = nullptr;
- const std::string tgtfmt = gtgt->GetSafeProperty("Fortran_FORMAT");
+ std::string const& tgtfmt = gtgt->GetSafeProperty("Fortran_FORMAT");
switch (cmOutputConverter::GetFortranFormat(tgtfmt)) {
case cmOutputConverter::FortranFormatFixed:
format = "fixed";
@@ -2416,7 +2416,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt,
std::string attribute = prop.substr(16);
this->FilterConfigurationAttribute(configName, attribute);
if (!attribute.empty()) {
- const std::string pr = gtgt->GetSafeProperty(prop);
+ std::string const& pr = gtgt->GetSafeProperty(prop);
std::string processed = cmGeneratorExpression::Evaluate(
pr, this->CurrentLocalGenerator, configName);
buildSettings->AddAttribute(attribute,