From 3771bac729d07a2117be6aa29f8c824a8e3d60bc Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Mon, 26 Oct 2020 15:35:00 +0100 Subject: Use ostringstream instead of stringstream for string building. --- uunit.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/uunit.h b/uunit.h index 44dc2a0..97f3ecc 100644 --- a/uunit.h +++ b/uunit.h @@ -173,7 +173,7 @@ protected: { if(!value) { - std::stringstream ss; + std::ostringstream ss; ss << "assertion failed" << std::endl << "- Expression: " << expr << "" << std::endl; throw test_result{"", file, line, ss.str()}; @@ -188,7 +188,7 @@ protected: { if(std::fabs(expected - value) > 0.0000001) { - std::stringstream ss; + std::ostringstream ss; ss << "equality assertion failed" << std::endl << "- Expected: " << expected << "" << std::endl << "- Actual : " << value << "" << std::endl; @@ -201,7 +201,7 @@ protected: { if(expected != value) { - std::stringstream ss; + std::ostringstream ss; ss << "equality assertion failed" << std::endl << "- Expected: " << expected << "" << std::endl << "- Actual : " << value << "" << std::endl; -- cgit v1.2.3