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/test_write.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/test_write.cpp') diff --git a/tests/test_write.cpp b/tests/test_write.cpp index ca230c3..da83745 100644 --- a/tests/test_write.cpp +++ b/tests/test_write.cpp @@ -171,7 +171,7 @@ struct test_writer: xml_writer virtual void write(const void* data, size_t size) { CHECK(size % sizeof(pugi::char_t) == 0); - contents += std::basic_string(static_cast(data), static_cast(data) + size / sizeof(pugi::char_t)); + contents.append(static_cast(data), size / sizeof(pugi::char_t)); } }; -- cgit v1.2.3