summaryrefslogtreecommitdiff
path: root/absl/base/spinlock_test_common.cc
diff options
context:
space:
mode:
Diffstat (limited to 'absl/base/spinlock_test_common.cc')
-rw-r--r--absl/base/spinlock_test_common.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/absl/base/spinlock_test_common.cc b/absl/base/spinlock_test_common.cc
index dee266e4..2b572c5b 100644
--- a/absl/base/spinlock_test_common.cc
+++ b/absl/base/spinlock_test_common.cc
@@ -92,6 +92,7 @@ static void TestFunction(int thread_salt, SpinLock* spinlock) {
static void ThreadedTest(SpinLock* spinlock) {
std::vector<std::thread> threads;
+ threads.reserve(kNumThreads);
for (int i = 0; i < kNumThreads; ++i) {
threads.push_back(std::thread(TestFunction, i, spinlock));
}