summaryrefslogtreecommitdiff
path: root/Source/cmCacheManager.cxx
diff options
context:
space:
mode:
authorNils Gladitz <nilsgladitz@gmail.com>2014-10-15 14:54:05 +0200
committerNils Gladitz <nilsgladitz@gmail.com>2014-10-15 14:54:05 +0200
commitcc1139cc304b6bd4c8403d437cf08f73e06e243a (patch)
treee9645a08b795a6eef8233e82c07370bc3cfa0673 /Source/cmCacheManager.cxx
parent1b3495d32e1523648da08e138482a654f8765333 (diff)
downloadcmake-cc1139cc304b6bd4c8403d437cf08f73e06e243a.tar.gz
strings: Remove redundant calls to std::string::c_str()
Replacements were detected and performed by the clang tool remove-cstr-calls on a linux build.
Diffstat (limited to 'Source/cmCacheManager.cxx')
-rw-r--r--Source/cmCacheManager.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx
index d6b84a0002..9fc1a5ab7b 100644
--- a/Source/cmCacheManager.cxx
+++ b/Source/cmCacheManager.cxx
@@ -189,7 +189,7 @@ void cmCacheManager::CleanCMakeFiles(const std::string& path)
for(std::vector<std::string>::iterator i = files.begin();
i != files.end(); ++i)
{
- cmSystemTools::RemoveFile(i->c_str());
+ cmSystemTools::RemoveFile(*i);
}
}
@@ -336,7 +336,7 @@ bool cmCacheManager::LoadCache(const std::string& path,
cmSystemTools::ConvertToUnixSlashes(currentcwd);
currentcwd += "/CMakeCache.txt";
oldcwd += "/CMakeCache.txt";
- if(!cmSystemTools::SameFile(oldcwd.c_str(), currentcwd.c_str()))
+ if(!cmSystemTools::SameFile(oldcwd, currentcwd))
{
std::string message =
std::string("The current CMakeCache.txt directory ") +
@@ -586,13 +586,13 @@ bool cmCacheManager::DeleteCache(const std::string& path)
cacheFile += "/CMakeCache.txt";
if(cmSystemTools::FileExists(cacheFile.c_str()))
{
- cmSystemTools::RemoveFile(cacheFile.c_str());
+ cmSystemTools::RemoveFile(cacheFile);
// now remove the files in the CMakeFiles directory
// this cleans up language cache files
cmakeFiles += cmake::GetCMakeFilesDirectory();
- if(cmSystemTools::FileIsDirectory(cmakeFiles.c_str()))
+ if(cmSystemTools::FileIsDirectory(cmakeFiles))
{
- cmSystemTools::RemoveADirectory(cmakeFiles.c_str());
+ cmSystemTools::RemoveADirectory(cmakeFiles);
}
}
return true;