summaryrefslogtreecommitdiff
path: root/tests/test_write.cpp
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2015-01-20 20:37:14 -0800
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2015-01-24 08:20:42 -0800
commit650a4c6cca98e3d1c973d86b91797e85f4861e6d (patch)
tree2a57a021a00cfe1d461a5ba1c23244a64d383455 /tests/test_write.cpp
parent3181a305edc9159c71036ff0070f1c3153ec3f1d (diff)
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.
Diffstat (limited to 'tests/test_write.cpp')
-rw-r--r--tests/test_write.cpp2
1 files changed, 1 insertions, 1 deletions
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<pugi::char_t>(static_cast<const pugi::char_t*>(data), static_cast<const pugi::char_t*>(data) + size / sizeof(pugi::char_t));
+ contents.append(static_cast<const pugi::char_t*>(data), size / sizeof(pugi::char_t));
}
};