From 650a4c6cca98e3d1c973d86b91797e85f4861e6d Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Tue, 20 Jan 2015 20:37:14 -0800 Subject: Use string::append in implementations of xml_writer The current code is not optimal; since users actually read samples/tests change them to use faster (and shorter!) code. --- tests/writer_string.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/writer_string.cpp') diff --git a/tests/writer_string.cpp b/tests/writer_string.cpp index a09678b..661c792 100644 --- a/tests/writer_string.cpp +++ b/tests/writer_string.cpp @@ -15,7 +15,7 @@ static bool test_narrow(const std::string& result, const char* expected, size_t void xml_writer_string::write(const void* data, size_t size) { - contents += std::string(static_cast(data), size); + contents.append(static_cast(data), size); } std::string xml_writer_string::as_narrow() const -- cgit v1.2.3