summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2025-02-10 12:58:12 -0500
committerDavid Robillard <d@drobilla.net>2025-02-10 12:58:12 -0500
commitc3390bdca046a82f6ddc35aafd56bbd0a492bb7d (patch)
treebc4f43a4f96272f05beb705c17f932e6ad7b109b /test
parent9a3b9f0981eee2febc71af8f6975fb3f190d7da4 (diff)
downloadraul-c3390bdca046a82f6ddc35aafd56bbd0a492bb7d.tar.gz
raul-c3390bdca046a82f6ddc35aafd56bbd0a492bb7d.tar.bz2
raul-c3390bdca046a82f6ddc35aafd56bbd0a492bb7d.zip
Reserve vector space before emplacing in a loop
Diffstat (limited to 'test')
-rw-r--r--test/maid_test.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/maid_test.cpp b/test/maid_test.cpp
index 2088c83..d6ee1db 100644
--- a/test/maid_test.cpp
+++ b/test/maid_test.cpp
@@ -84,6 +84,7 @@ test()
// Create some threads to produce garbage
std::vector<std::thread> litterers;
+ litterers.reserve(n_threads);
for (size_t i = 0; i < n_threads; ++i) {
litterers.emplace_back(litter, &maid);
}