diff options
author | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2016-05-24 20:58:11 (GMT) |
---|---|---|
committer | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2016-05-24 21:22:20 (GMT) |
commit | 5cec953e6aafd4c132a7b6c0a929d95c1dee79ea (patch) | |
tree | 09cf2f4a8f28c5ca8a7e648486fc10e1ae5e2d89 /Source/cmGlobalVisualStudio7Generator.cxx | |
parent | 2a1a2033afe73da08af46e12ed77a8f55a89417f (diff) | |
download | CMake-5cec953e6aafd4c132a7b6c0a929d95c1dee79ea.zip CMake-5cec953e6aafd4c132a7b6c0a929d95c1dee79ea.tar.gz CMake-5cec953e6aafd4c132a7b6c0a929d95c1dee79ea.tar.bz2 |
Use std::replace for replacing chars in strings.
Find uses of `cmSystemTools::ReplaceString` where both `replace` and
`with` are string literals with a size of one.
Automate with:
git grep -l ReplaceString | xargs sed -i "s|cmSystemTools::ReplaceString(\([^,]*\), \"\(.\)\", \"\(.\)\");|std::replace(\1.begin(), \1.end(), '\2', '\3');|g"
git grep -l ReplaceString | xargs sed -i "s|cmSystemTools::ReplaceString(\([^,]*\), \"\(.\)\", \"\\\\\\\\\");|std::replace(\1.begin(), \1.end(), '\2', '\\\\\\\\');|g"
git grep -l ReplaceString | xargs sed -i "s|cmSystemTools::ReplaceString(\([^,]*\), \"\\\\\\\\\", \"\(.\)\");|std::replace(\1.begin(), \1.end(), '\\\\\\\\', '\2');|g"
Diffstat (limited to 'Source/cmGlobalVisualStudio7Generator.cxx')
-rw-r--r-- | Source/cmGlobalVisualStudio7Generator.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index cfe5e49..3f2dd17 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -457,7 +457,7 @@ void cmGlobalVisualStudio7Generator::WriteFolders(std::ostream& fout) std::string fullName = iter->first; std::string guid = this->GetGUID(fullName.c_str()); - cmSystemTools::ReplaceString(fullName, "/", "\\"); + std::replace(fullName.begin(), fullName.end(), '/', '\\'); if (cmSystemTools::StringStartsWith(fullName.c_str(), prefix)) { fullName = fullName.substr(skip_prefix); } |