summaryrefslogtreecommitdiffstats
path: root/Source/cmCTest.cxx
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2019-05-23 12:49:54 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2019-05-23 14:19:49 (GMT)
commit006229278b54ee92003100773a0430565fb8fe87 (patch)
tree04a9927d32bf98df5685fde3b0e5be4811e67f8d /Source/cmCTest.cxx
parent999516478d56d8604d1413fe3c677a860357516c (diff)
downloadCMake-006229278b54ee92003100773a0430565fb8fe87.zip
CMake-006229278b54ee92003100773a0430565fb8fe87.tar.gz
CMake-006229278b54ee92003100773a0430565fb8fe87.tar.bz2
Use cmAppend to append ranges to std::vector instances
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r--Source/cmCTest.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 003ebdc..071ff56 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -1282,7 +1282,7 @@ int cmCTest::RunTest(std::vector<const char*> argv, std::string* output,
while (cmsysProcess_WaitForData(cp, &data, &length, nullptr)) {
processOutput.DecodeText(data, length, strdata);
if (output) {
- tempOutput.insert(tempOutput.end(), data, data + length);
+ cmAppend(tempOutput, data, data + length);
}
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT,
cmCTestLogWrite(strdata.c_str(), strdata.size()));
@@ -2194,8 +2194,7 @@ int cmCTest::Run(std::vector<std::string>& args, std::string* output)
bool SRArgumentSpecified = false;
// copy the command line
- this->Impl->InitialCommandLineArguments.insert(
- this->Impl->InitialCommandLineArguments.end(), args.begin(), args.end());
+ cmAppend(this->Impl->InitialCommandLineArguments, args);
// process the command line arguments
for (size_t i = 1; i < args.size(); ++i) {
@@ -2958,10 +2957,10 @@ bool cmCTest::RunCommand(std::vector<std::string> const& args,
res = cmsysProcess_WaitForData(cp, &data, &length, nullptr);
switch (res) {
case cmsysProcess_Pipe_STDOUT:
- tempOutput.insert(tempOutput.end(), data, data + length);
+ cmAppend(tempOutput, data, data + length);
break;
case cmsysProcess_Pipe_STDERR:
- tempError.insert(tempError.end(), data, data + length);
+ cmAppend(tempError, data, data + length);
break;
default:
done = true;