From f16be402f77eaea8996b60299f670bfa557cee52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Tue, 18 Aug 2020 13:47:58 +0200 Subject: [PATCH] Make XmlEncoding tests slightly more efficient --- tests/SelfTest/IntrospectiveTests/Xml.tests.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/SelfTest/IntrospectiveTests/Xml.tests.cpp b/tests/SelfTest/IntrospectiveTests/Xml.tests.cpp index 519c3d40..74f42383 100644 --- a/tests/SelfTest/IntrospectiveTests/Xml.tests.cpp +++ b/tests/SelfTest/IntrospectiveTests/Xml.tests.cpp @@ -1,10 +1,10 @@ #include #include -#include +#include -inline std::string encode( std::string const& str, Catch::XmlEncode::ForWhat forWhat = Catch::XmlEncode::ForTextNodes ) { - std::ostringstream oss; +static std::string encode( std::string const& str, Catch::XmlEncode::ForWhat forWhat = Catch::XmlEncode::ForTextNodes ) { + Catch::ReusableStringStream oss; oss << Catch::XmlEncode( str, forWhat ); return oss.str(); }