summaryrefslogtreecommitdiff
path: root/tests/writer_string.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/writer_string.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/writer_string.cpp')
-rw-r--r--tests/writer_string.cpp2
1 files changed, 1 insertions, 1 deletions
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<const char*>(data), size);
+ contents.append(static_cast<const char*>(data), size);
}
std::string xml_writer_string::as_narrow() const