diff options
author | Artur Ryt <artur.ryt@gmail.com> | 2019-03-30 15:11:21 (GMT) |
---|---|---|
committer | Artur Ryt <artur.ryt@gmail.com> | 2019-03-30 15:15:05 (GMT) |
commit | 2d66567dca2a5a80e41493ec0a9d6d86f7d955f5 (patch) | |
tree | 84468e248f456f65c75a99033ba8073e48ea0f5b /Source/CTest/cmCTestLaunch.cxx | |
parent | 5bdee3786359b6560eb9ee1d6fab8664feb90db4 (diff) | |
download | CMake-2d66567dca2a5a80e41493ec0a9d6d86f7d955f5.zip CMake-2d66567dca2a5a80e41493ec0a9d6d86f7d955f5.tar.gz CMake-2d66567dca2a5a80e41493ec0a9d6d86f7d955f5.tar.bz2 |
Modernize: Prefer .substr in place of .c_str() + int
A lot of temporary/local strings were created out of C-strings
substr can utilize current string size, so in theory be a little
more efficient.
Diffstat (limited to 'Source/CTest/cmCTestLaunch.cxx')
-rw-r--r-- | Source/CTest/cmCTestLaunch.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/CTest/cmCTestLaunch.cxx b/Source/CTest/cmCTestLaunch.cxx index 5e66e05..a96513e 100644 --- a/Source/CTest/cmCTestLaunch.cxx +++ b/Source/CTest/cmCTestLaunch.cxx @@ -308,7 +308,7 @@ void cmCTestLaunch::LoadLabels() if (line[0] == ' ') { // Label lines appear indented by one space. if (inTarget || inSource) { - this->Labels.insert(line.c_str() + 1); + this->Labels.insert(line.substr(1)); } } else if (!this->OptionSource.empty() && !inSource) { // Non-indented lines specify a source file name. The first one |