summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestBuildCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-08-26 14:37:11 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-08-26 14:49:10 (GMT)
commit37c671570c4b344d66eb522ab2b63686550f993b (patch)
treea750e9e4185162f8af26131e9b4b316acae5272a /Source/CTest/cmCTestBuildCommand.cxx
parent8685d0d2911f01fb7e2d26a2fd904dbf73712ce4 (diff)
parent3b2b02825d88a045d08b8295927652cbcff408a8 (diff)
downloadCMake-37c671570c4b344d66eb522ab2b63686550f993b.zip
CMake-37c671570c4b344d66eb522ab2b63686550f993b.tar.gz
CMake-37c671570c4b344d66eb522ab2b63686550f993b.tar.bz2
Merge topic 'source_sweep_ostringstream_single'
3b2b02825d Source sweep: Replace std::ostringstream when used with a single append Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3726
Diffstat (limited to 'Source/CTest/cmCTestBuildCommand.cxx')
-rw-r--r--Source/CTest/cmCTestBuildCommand.cxx13
1 files changed, 6 insertions, 7 deletions
diff --git a/Source/CTest/cmCTestBuildCommand.cxx b/Source/CTest/cmCTestBuildCommand.cxx
index 6e76f08..cb22fa6 100644
--- a/Source/CTest/cmCTestBuildCommand.cxx
+++ b/Source/CTest/cmCTestBuildCommand.cxx
@@ -154,16 +154,15 @@ bool cmCTestBuildCommand::InitialPass(std::vector<std::string> const& args,
{
bool ret = cmCTestHandlerCommand::InitialPass(args, status);
if (this->Values[ctb_NUMBER_ERRORS] && *this->Values[ctb_NUMBER_ERRORS]) {
- std::ostringstream str;
- str << this->Handler->GetTotalErrors();
- this->Makefile->AddDefinition(this->Values[ctb_NUMBER_ERRORS], str.str());
+ this->Makefile->AddDefinition(
+ this->Values[ctb_NUMBER_ERRORS],
+ std::to_string(this->Handler->GetTotalErrors()));
}
if (this->Values[ctb_NUMBER_WARNINGS] &&
*this->Values[ctb_NUMBER_WARNINGS]) {
- std::ostringstream str;
- str << this->Handler->GetTotalWarnings();
- this->Makefile->AddDefinition(this->Values[ctb_NUMBER_WARNINGS],
- str.str());
+ this->Makefile->AddDefinition(
+ this->Values[ctb_NUMBER_WARNINGS],
+ std::to_string(this->Handler->GetTotalWarnings()));
}
return ret;
}