cmCPluginAPI: Remove a few unnecessary c_str() calls

This commit is contained in:
Vitaly Stakhovsky
2018-04-30 10:25:34 -04:00
committed by Brad King
parent 0036966c0b
commit b542e0c74f
+3 -3
View File
@@ -664,7 +664,7 @@ void CCONV cmSourceFileSetName(void* arg, const char* name, const char* dir,
// First try and see whether the listed file can be found // First try and see whether the listed file can be found
// as is without extensions added on. // as is without extensions added on.
std::string hname = pathname; std::string hname = pathname;
if (cmSystemTools::FileExists(hname.c_str())) { if (cmSystemTools::FileExists(hname)) {
sf->SourceName = cmSystemTools::GetFilenamePath(name); sf->SourceName = cmSystemTools::GetFilenamePath(name);
if (!sf->SourceName.empty()) { if (!sf->SourceName.empty()) {
sf->SourceName += "/"; sf->SourceName += "/";
@@ -691,7 +691,7 @@ void CCONV cmSourceFileSetName(void* arg, const char* name, const char* dir,
hname = pathname; hname = pathname;
hname += "."; hname += ".";
hname += *ext; hname += *ext;
if (cmSystemTools::FileExists(hname.c_str())) { if (cmSystemTools::FileExists(hname)) {
sf->SourceExtension = *ext; sf->SourceExtension = *ext;
sf->FullPath = hname; sf->FullPath = hname;
return; return;
@@ -704,7 +704,7 @@ void CCONV cmSourceFileSetName(void* arg, const char* name, const char* dir,
hname = pathname; hname = pathname;
hname += "."; hname += ".";
hname += *ext; hname += *ext;
if (cmSystemTools::FileExists(hname.c_str())) { if (cmSystemTools::FileExists(hname)) {
sf->SourceExtension = *ext; sf->SourceExtension = *ext;
sf->FullPath = hname; sf->FullPath = hname;
return; return;