[Libreoffice-commits] online.git: test/UnitTyping.cpp

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri May 31 06:35:11 UTC 2019


 test/UnitTyping.cpp |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit 7aac2285390ab4a92050c6a114ea3f12ea05b203
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Fri May 31 08:34:41 2019 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Fri May 31 08:34:48 2019 +0200

    test: use reserve() before calling emplace_back() in a loop
    
    Change-Id: Ieb754e9433cad9fc47c3449c1957702e493c7533

diff --git a/test/UnitTyping.cpp b/test/UnitTyping.cpp
index cb884d95f..b9adcd7de 100644
--- a/test/UnitTyping.cpp
+++ b/test/UnitTyping.cpp
@@ -126,6 +126,7 @@ public:
         std::atomic<int> liveTyping(0);
 
         // First some rendering load
+        threads.reserve(numRender);
         for (int i = 0; i < numRender; ++i)
             threads.emplace_back([&,i] {
                     std::mt19937 randDev(numRender * 257);


More information about the Libreoffice-commits mailing list