summaryrefslogtreecommitdiff
path: root/Source/UnitTests/Common/FlagTest.cpp
diff options
context:
space:
mode:
authorJordan Woyak <jordan.woyak@gmail.com>2025-05-07 15:48:26 -0500
committerGitHub <noreply@github.com>2025-05-07 15:48:26 -0500
commit1c54583ae7c0a25205e84db2055bc3c8c7c1b782 (patch)
treec6e9d173ddcff005d53f0fc215a360ecb3ac0df6 /Source/UnitTests/Common/FlagTest.cpp
parentb8ca3c8d1532eb72662d905fda07cc1e22d5265e (diff)
parent947bdea590e5fe7015aa2a87190e4a8f8f36e276 (diff)
Merge pull request #13569 from tygyh/UnitTests-Use-constexpr
UnitTests: Use `constexpr`
Diffstat (limited to 'Source/UnitTests/Common/FlagTest.cpp')
-rw-r--r--Source/UnitTests/Common/FlagTest.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/UnitTests/Common/FlagTest.cpp b/Source/UnitTests/Common/FlagTest.cpp
index 2bda2f66b6..23aba5f60d 100644
--- a/Source/UnitTests/Common/FlagTest.cpp
+++ b/Source/UnitTests/Common/FlagTest.cpp
@@ -34,7 +34,7 @@ TEST(Flag, MultiThreaded)
{
Flag f;
int count = 0;
- const int ITERATIONS_COUNT = 100000;
+ constexpr int ITERATIONS_COUNT = 100000;
auto setter = [&]() {
for (int i = 0; i < ITERATIONS_COUNT; ++i)
@@ -69,8 +69,8 @@ TEST(Flag, SpinLock)
// Uses a flag to implement basic spinlocking using TestAndSet.
Flag f;
int count = 0;
- const int ITERATIONS_COUNT = 5000;
- const int THREADS_COUNT = 50;
+ constexpr int ITERATIONS_COUNT = 5000;
+ constexpr int THREADS_COUNT = 50;
auto adder_func = [&]() {
for (int i = 0; i < ITERATIONS_COUNT; ++i)