summaryrefslogtreecommitdiff
path: root/Source/UnitTests/Common/FlagTest.cpp
diff options
context:
space:
mode:
authorDr. Dystopia <jonis9898@hotmail.com>2025-04-23 07:24:48 +0200
committerDr. Dystopia <jonis9898@hotmail.com>2025-04-23 12:45:08 +0200
commit947bdea590e5fe7015aa2a87190e4a8f8f36e276 (patch)
treecabcb78cb0168e07808356a8a12272cdddfb4bee /Source/UnitTests/Common/FlagTest.cpp
parent89873d623855497d8ce59c98a6d27b59a091b3e7 (diff)
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)