• Sebastian Holtermann's avatar
    Source sweep: Use cmStrCat for string concatenation · 9b334397
    Sebastian Holtermann authored
    This patch is generated by a python script that uses regular expressions to
    search for string concatenation patterns of the kind
    
    ```
    std::string str = <ARG0>;
    str += <ARG1>;
    str += <ARG2>;
    ...
    ```
    
    and replaces them with a single `cmStrCat` call
    
    ```
    std::string str = cmStrCat(<ARG0>, <ARG1>, <ARG2>, ...);
    ```
    
    If any `<ARGX>` is itself a concatenated string of the kind
    
    ```
    a + b + c + ...;
    ```
    
    then `<ARGX>` is split into multiple arguments for the `cmStrCat` call.
    
    If there's a sequence of literals in the `<ARGX>`, then all literals in the
    sequence are concatenated and merged into a single literal argument for
    the `cmStrCat` call.
    
    Single character strings are converted to single char arguments for
    the `cmStrCat` call.
    
    `std::to_string(...)` wrappings are removed from `cmStrCat` arguments,
    because it supports numeric types as well as string types.
    
    `arg.substr(x)` arguments to `cmStrCat` are replaced with
    `cm::string_view(arg).substr(x)`
    9b334397
Name
Last commit
Last update
..
IFW Loading commit data...
WiX Loading commit data...
OSXLauncherScript.scpt Loading commit data...
OSXScriptLauncher.cxx Loading commit data...
cmCPack7zGenerator.cxx Loading commit data...
cmCPack7zGenerator.h Loading commit data...
cmCPackArchiveGenerator.cxx Loading commit data...
cmCPackArchiveGenerator.h Loading commit data...
cmCPackBundleGenerator.cxx Loading commit data...
cmCPackBundleGenerator.h Loading commit data...
cmCPackComponentGroup.cxx Loading commit data...
cmCPackComponentGroup.h Loading commit data...
cmCPackConfigure.h.in Loading commit data...
cmCPackCygwinBinaryGenerator.cxx Loading commit data...
cmCPackCygwinBinaryGenerator.h Loading commit data...
cmCPackCygwinSourceGenerator.cxx Loading commit data...
cmCPackCygwinSourceGenerator.h Loading commit data...
cmCPackDebGenerator.cxx Loading commit data...
cmCPackDebGenerator.h Loading commit data...
cmCPackDragNDropGenerator.cxx Loading commit data...
cmCPackDragNDropGenerator.h Loading commit data...
cmCPackExternalGenerator.cxx Loading commit data...
cmCPackExternalGenerator.h Loading commit data...
cmCPackFreeBSDGenerator.cxx Loading commit data...
cmCPackFreeBSDGenerator.h Loading commit data...
cmCPackGenerator.cxx Loading commit data...
cmCPackGenerator.h Loading commit data...
cmCPackGeneratorFactory.cxx Loading commit data...
cmCPackGeneratorFactory.h Loading commit data...
cmCPackLog.cxx Loading commit data...
cmCPackLog.h Loading commit data...
cmCPackNSISGenerator.cxx Loading commit data...
cmCPackNSISGenerator.h Loading commit data...
cmCPackNuGetGenerator.cxx Loading commit data...
cmCPackNuGetGenerator.h Loading commit data...
cmCPackOSXX11Generator.cxx Loading commit data...
cmCPackOSXX11Generator.h Loading commit data...
cmCPackPKGGenerator.cxx Loading commit data...
cmCPackPKGGenerator.h Loading commit data...
cmCPackPackageMakerGenerator.cxx Loading commit data...
cmCPackPackageMakerGenerator.h Loading commit data...
cmCPackProductBuildGenerator.cxx Loading commit data...
cmCPackProductBuildGenerator.h Loading commit data...
cmCPackRPMGenerator.cxx Loading commit data...
cmCPackRPMGenerator.h Loading commit data...
cmCPackSTGZGenerator.cxx Loading commit data...
cmCPackSTGZGenerator.h Loading commit data...
cmCPackTGZGenerator.cxx Loading commit data...
cmCPackTGZGenerator.h Loading commit data...
cmCPackTXZGenerator.cxx Loading commit data...
cmCPackTXZGenerator.h Loading commit data...
cmCPackTarBZip2Generator.cxx Loading commit data...
cmCPackTarBZip2Generator.h Loading commit data...
cmCPackTarCompressGenerator.cxx Loading commit data...
cmCPackTarCompressGenerator.h Loading commit data...
cmCPackZIPGenerator.cxx Loading commit data...
cmCPackZIPGenerator.h Loading commit data...
cpack.cxx Loading commit data...