summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalXCodeGenerator.cxx
diff options
context:
space:
mode:
authorGregor Jasny <gjasny@googlemail.com>2019-03-17 19:22:26 (GMT)
committerGregor Jasny <gjasny@googlemail.com>2019-03-17 19:41:35 (GMT)
commit482d9ef9a8fe640d45eabbf4d6b32cfe5c1d124d (patch)
tree533b06103ddc77f4563d442bd6a09c4e214e3309 /Source/cmGlobalXCodeGenerator.cxx
parent283330976f2379eec214bfe1d51a27c29cc1f8fc (diff)
downloadCMake-482d9ef9a8fe640d45eabbf4d6b32cfe5c1d124d.zip
CMake-482d9ef9a8fe640d45eabbf4d6b32cfe5c1d124d.tar.gz
CMake-482d9ef9a8fe640d45eabbf4d6b32cfe5c1d124d.tar.bz2
cmGlobalXCodeGenerator: Prefer std::string over char*
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 53baed5..4bfa0b1 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -1022,7 +1022,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeFileReferenceFromPath(
this->CreateString(fileType));
// Store the file path relative to the top of the source tree.
- std::string path = this->RelativeToSource(fullpath.c_str());
+ std::string path = this->RelativeToSource(fullpath);
std::string name = cmSystemTools::GetFilenameName(path);
const char* sourceTree =
(cmSystemTools::FileIsFullPath(path.c_str()) ? "<absolute>"
@@ -3063,7 +3063,7 @@ bool cmGlobalXCodeGenerator::CreateXCodeObjects(
// Point Xcode at the top of the source tree.
{
std::string pdir =
- this->RelativeToBinary(root->GetCurrentSourceDirectory().c_str());
+ this->RelativeToBinary(root->GetCurrentSourceDirectory());
this->RootObject->AddAttribute("projectDirPath", this->CreateString(pdir));
this->RootObject->AddAttribute("projectRoot", this->CreateString(""));
}
@@ -3457,7 +3457,7 @@ void cmGlobalXCodeGenerator::OutputXCodeSharedSchemes(
cmXCodeScheme schm(obj, testables[targetName],
this->CurrentConfigurationTypes, this->XcodeVersion);
schm.WriteXCodeSharedScheme(xcProjDir,
- this->RelativeToSource(xcProjDir.c_str()));
+ this->RelativeToSource(xcProjDir));
}
}
}
@@ -3559,7 +3559,7 @@ std::string cmGlobalXCodeGenerator::ConvertToRelativeForMake(
return cmSystemTools::ConvertToOutputPath(p);
}
-std::string cmGlobalXCodeGenerator::RelativeToSource(const char* p)
+std::string cmGlobalXCodeGenerator::RelativeToSource(const std::string& p)
{
// We force conversion because Xcode breakpoints do not work unless
// they are in a file named relative to the source tree.
@@ -3567,7 +3567,7 @@ std::string cmGlobalXCodeGenerator::RelativeToSource(const char* p)
cmSystemTools::JoinPath(this->ProjectSourceDirectoryComponents), p);
}
-std::string cmGlobalXCodeGenerator::RelativeToBinary(const char* p)
+std::string cmGlobalXCodeGenerator::RelativeToBinary(const std::string& p)
{
return this->CurrentLocalGenerator->MaybeConvertToRelativePath(
cmSystemTools::JoinPath(this->ProjectOutputDirectoryComponents), p);