https://github.com/Kitware/CMake
Revision 5cec953e6aafd4c132a7b6c0a929d95c1dee79ea authored by Daniel Pfeifer on 24 May 2016, 20:58:11 UTC, committed by Daniel Pfeifer on 24 May 2016, 21:22:20 UTC
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"
1 parent 2a1a203
Tip revision: 5cec953e6aafd4c132a7b6c0a929d95c1dee79ea authored by Daniel Pfeifer on 24 May 2016, 20:58:11 UTC
Use std::replace for replacing chars in strings.
Use std::replace for replacing chars in strings.
Tip revision: 5cec953
File | Mode | Size |
---|---|---|
Auxiliary | ||
Help | ||
Licenses | ||
Modules | ||
Packaging | ||
Source | ||
Templates | ||
Tests | ||
Utilities | ||
.clang-format | -rw-r--r-- | 217 bytes |
.gitattributes | -rw-r--r-- | 658 bytes |
.hooks-config.bash | -rw-r--r-- | 866 bytes |
CMakeCPack.cmake | -rw-r--r-- | 8.8 KB |
CMakeCPackOptions.cmake.in | -rw-r--r-- | 11.0 KB |
CMakeGraphVizOptions.cmake | -rw-r--r-- | 153 bytes |
CMakeLists.txt | -rw-r--r-- | 26.6 KB |
CMakeLogo.gif | -rw-r--r-- | 4.4 KB |
CONTRIBUTING.rst | -rw-r--r-- | 1.3 KB |
CTestConfig.cmake | -rw-r--r-- | 870 bytes |
CTestCustom.cmake.in | -rw-r--r-- | 5.1 KB |
CompileFlags.cmake | -rw-r--r-- | 3.1 KB |
Copyright.txt | -rw-r--r-- | 2.6 KB |
DartConfig.cmake | -rw-r--r-- | 804 bytes |
README.rst | -rw-r--r-- | 2.9 KB |
bootstrap | -rwxr-xr-x | 45.5 KB |
cmake_uninstall.cmake.in | -rw-r--r-- | 790 bytes |
configure | -rwxr-xr-x | 99 bytes |
doxygen.config | -rw-r--r-- | 27.4 KB |
Computing file changes ...