diff options
author | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2015-01-20 20:37:14 -0800 |
---|---|---|
committer | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2015-01-24 08:20:42 -0800 |
commit | 650a4c6cca98e3d1c973d86b91797e85f4861e6d (patch) | |
tree | 2a57a021a00cfe1d461a5ba1c23244a64d383455 /docs/samples | |
parent | 3181a305edc9159c71036ff0070f1c3153ec3f1d (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 'docs/samples')
-rw-r--r-- | docs/samples/save_custom_writer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/samples/save_custom_writer.cpp b/docs/samples/save_custom_writer.cpp index 9e9ee34..fe08b72 100644 --- a/docs/samples/save_custom_writer.cpp +++ b/docs/samples/save_custom_writer.cpp @@ -11,7 +11,7 @@ struct xml_string_writer: pugi::xml_writer virtual void write(const void* data, size_t size) { - result += std::string(static_cast<const char*>(data), size); + result.append(static_cast<const char*>(data), size); } }; //] |