wsd: set vector size when constructing
Change-Id: I68718554017b47b6df1c6bf3b997483d4c753136 Reviewed-on: https://gerrit.libreoffice.org/71021 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
This commit is contained in:
parent
ce78fec310
commit
c053dc38b2
1 changed files with 3 additions and 2 deletions
|
@ -29,8 +29,10 @@
|
|||
#include <climits>
|
||||
#include <condition_variable>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
#include <thread>
|
||||
|
||||
|
@ -1102,8 +1104,7 @@ public:
|
|||
|
||||
LOG_TRC("Sending back painted tiles for " << tileMsg << " of size " << output.size() << " bytes) for: " << tileMsg);
|
||||
|
||||
std::shared_ptr<std::vector<char>> response = std::make_shared<std::vector<char>>();
|
||||
response->resize(tileMsg.size() + output.size());
|
||||
std::shared_ptr<std::vector<char>> response = std::make_shared<std::vector<char>>(tileMsg.size() + output.size());
|
||||
std::copy(tileMsg.begin(), tileMsg.end(), response->begin());
|
||||
std::copy(output.begin(), output.end(), response->begin() + tileMsg.size());
|
||||
|
||||
|
|
Loading…
Reference in a new issue