summaryrefslogtreecommitdiffstats
path: root/wsd/TileDesc.hpp
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2020-02-28 14:51:22 +0100
committerMiklos Vajna <vmiklos@collabora.com>2020-02-28 18:31:37 +0100
commit547f9ea73186d274d512a9fa1f01e6edcad66bab (patch)
tree50ccbbcd9c7ae0e0d4fc6da93a667aa05c5cfbdc /wsd/TileDesc.hpp
parentRework LOOLProtocol::tokenize() to return a StringVector object (diff)
downloadonline-547f9ea73186d274d512a9fa1f01e6edcad66bab.tar.gz
online-547f9ea73186d274d512a9fa1f01e6edcad66bab.zip
Rework StringVector to have a single underlying string
This is meant to reduce lots of small allocations and instead have pointers into the single string for the various tokens instead. This has a few requirements, though: 1) It's no longer OK to modify the tokens, changing their length would invalidate the start/length of other tokens. Rework DocumentBroker::load() to avoid such mutation. 2) The iterators no longer expose zero-terminated strings, so Poco::cat() doesn't work anymore: add an own cat() instead and use that in e.g. ChildSession. The own cat() has the benefit that it won't read past the end of the array if the begin index is out of bounds to add more safety. (This nicely works towards killing Poco usage in general.) 3) If zero-terminated strings for all individual tokens is needed, a copy has to be made, as done in spawnProcess(). (For all of these requirements, the build fails if there are problems.) Change-Id: Iea40e4400e630b2d669f5c72aea85cb40edf9a2c Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89711 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Diffstat (limited to 'wsd/TileDesc.hpp')
-rw-r--r--wsd/TileDesc.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/wsd/TileDesc.hpp b/wsd/TileDesc.hpp
index d1296f0c84..e8eebdcf20 100644
--- a/wsd/TileDesc.hpp
+++ b/wsd/TileDesc.hpp
@@ -472,7 +472,7 @@ public:
{
std::string name;
std::string value;
- if (LOOLProtocol::parseNameValuePair(token, name, value))
+ if (LOOLProtocol::parseNameValuePair(tokens.getParam(token), name, value))
{
if (name == "tileposx")
{