diff options
author | Regina Pfeifer <regina@mailbox.org> | 2019-01-16 06:13:07 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-01-17 18:12:02 (GMT) |
commit | ef61997b1be5c2f542472f8eb48dac62cd26bf5c (patch) | |
tree | 3d17442b633d74e8e18f4f4c48578f3b639d25be /Source/CTest/cmCTestCoverageHandler.cxx | |
parent | 2e5307a2a45d456b7fb52e4d3fab1416dc9a1bd8 (diff) | |
download | CMake-ef61997b1be5c2f542472f8eb48dac62cd26bf5c.zip CMake-ef61997b1be5c2f542472f8eb48dac62cd26bf5c.tar.gz CMake-ef61997b1be5c2f542472f8eb48dac62cd26bf5c.tar.bz2 |
clang-tidy: Use emplace
Diffstat (limited to 'Source/CTest/cmCTestCoverageHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestCoverageHandler.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx index fbd1038..6c68f46 100644 --- a/Source/CTest/cmCTestCoverageHandler.cxx +++ b/Source/CTest/cmCTestCoverageHandler.cxx @@ -56,12 +56,12 @@ public: void SetCommand(const char* command) { this->CommandLineStrings.clear(); - this->CommandLineStrings.push_back(command); + this->CommandLineStrings.emplace_back(command); } void AddArgument(const char* arg) { if (arg) { - this->CommandLineStrings.push_back(arg); + this->CommandLineStrings.emplace_back(arg); } } void SetWorkingDirectory(const char* dir) { this->WorkingDirectory = dir; } @@ -316,8 +316,7 @@ int cmCTestCoverageHandler::ProcessHandler() // setup the regex exclude stuff this->CustomCoverageExcludeRegex.clear(); for (std::string const& rex : this->CustomCoverageExclude) { - this->CustomCoverageExcludeRegex.push_back( - cmsys::RegularExpression(rex.c_str())); + this->CustomCoverageExcludeRegex.emplace_back(rex); } if (this->HandleBullseyeCoverage(&cont)) { @@ -1005,7 +1004,7 @@ int cmCTestCoverageHandler::HandleGCovCoverage( std::vector<std::string> basecovargs = cmSystemTools::ParseArguments(gcovExtraFlags.c_str()); basecovargs.insert(basecovargs.begin(), gcovCommand); - basecovargs.push_back("-o"); + basecovargs.emplace_back("-o"); // files is a list of *.da and *.gcda files with coverage data in them. // These are binary files that you give as input to gcov so that it will |