test/httpwstest.cpp | 1 +
1 file changed, 1 insertion(+)
New commits:
commit 54e4147887d70de73b30e5c002cd1bde5cd9d5b6
Author: Miklos Vajna <[email protected]>
AuthorDate: Mon Nov 26 09:43:17 2018 +0100
Commit: Miklos Vajna <[email protected]>
CommitDate: Mon Nov 26 09:43:17 2018 +0100
httpwstest: 'emplace_back' is called inside a loop
Pre-allocate the vector capacity before the loop to avoid realloc waste.
Change-Id: I78370d79728ae66446d2b979d376cb50ba3ae864
diff --git a/test/httpwstest.cpp b/test/httpwstest.cpp
index f0aee365a..1395624a5 100644
--- a/test/httpwstest.cpp
+++ b/test/httpwstest.cpp
@@ -585,6 +585,7 @@ void HTTPWSTest::testLoadTorture()
std::vector<std::string> docNames = { "setclientpart.ods", "hello.odt",
"viewcursor.odp" };
std::vector<std::thread> threads;
+ threads.reserve(docNames.size());
for (const auto& docName : docNames)
{
threads.emplace_back([&]
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits