From c053dc38b2b1c8da9685fbeabb88e63d5669593d Mon Sep 17 00:00:00 2001 From: Ashod Nakashian Date: Sat, 20 Apr 2019 14:10:38 -0400 Subject: [PATCH] wsd: set vector size when constructing Change-Id: I68718554017b47b6df1c6bf3b997483d4c753136 Reviewed-on: https://gerrit.libreoffice.org/71021 Reviewed-by: Ashod Nakashian Tested-by: Ashod Nakashian --- kit/Kit.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kit/Kit.cpp b/kit/Kit.cpp index 281853b42..76dddab46 100644 --- a/kit/Kit.cpp +++ b/kit/Kit.cpp @@ -29,8 +29,10 @@ #include #include #include +#include #include #include +#include #include #include @@ -1102,8 +1104,7 @@ public: LOG_TRC("Sending back painted tiles for " << tileMsg << " of size " << output.size() << " bytes) for: " << tileMsg); - std::shared_ptr> response = std::make_shared>(); - response->resize(tileMsg.size() + output.size()); + std::shared_ptr> response = std::make_shared>(tileMsg.size() + output.size()); std::copy(tileMsg.begin(), tileMsg.end(), response->begin()); std::copy(output.begin(), output.end(), response->begin() + tileMsg.size());