summaryrefslogtreecommitdiff
path: root/Source/UnitTests
diff options
context:
space:
mode:
authorDr. Dystopia <jonis9898@hotmail.com>2025-04-28 22:02:56 +0200
committerDr. Dystopia <jonis9898@hotmail.com>2025-06-14 10:19:31 +0200
commitca8f9b672b3d8da3e2974802e89f6c6b6e23d99e (patch)
treeb6dd8deb5f1bf6d110d71a73521a241d37c577b1 /Source/UnitTests
parent95f6c76713e6c2a6b50f1a149a7886e72fea6ec7 (diff)
Source: Remove redundant lambda parameter lists
Diffstat (limited to 'Source/UnitTests')
-rw-r--r--Source/UnitTests/Common/BlockingLoopTest.cpp8
-rw-r--r--Source/UnitTests/Common/BusyLoopTest.cpp2
-rw-r--r--Source/UnitTests/Common/EventTest.cpp4
-rw-r--r--Source/UnitTests/Common/FlagTest.cpp6
-rw-r--r--Source/UnitTests/Common/SPSCQueueTest.cpp4
5 files changed, 12 insertions, 12 deletions
diff --git a/Source/UnitTests/Common/BlockingLoopTest.cpp b/Source/UnitTests/Common/BlockingLoopTest.cpp
index 4d8856b94e..85e4aae415 100644
--- a/Source/UnitTests/Common/BlockingLoopTest.cpp
+++ b/Source/UnitTests/Common/BlockingLoopTest.cpp
@@ -24,8 +24,8 @@ TEST(BlockingLoop, MultiThreaded)
// Must not block as the loop is stopped.
loop.Wait();
- std::thread loop_thread([&]() {
- loop.Run([&]() {
+ std::thread loop_thread([&] {
+ loop.Run([&] {
received_a.store(signaled_a.load());
received_b.store(signaled_b.load());
});
@@ -39,7 +39,7 @@ TEST(BlockingLoop, MultiThreaded)
EXPECT_EQ(signaled_a.load(), received_a.load());
EXPECT_EQ(signaled_b.load(), received_b.load());
- std::thread run_a_thread([&]() {
+ std::thread run_a_thread([&] {
for (int j = 0; j < 100; j++)
{
for (int k = 0; k < 100; k++)
@@ -52,7 +52,7 @@ TEST(BlockingLoop, MultiThreaded)
EXPECT_EQ(signaled_a.load(), received_a.load());
}
});
- std::thread run_b_thread([&]() {
+ std::thread run_b_thread([&] {
for (int j = 0; j < 100; j++)
{
for (int k = 0; k < 100; k++)
diff --git a/Source/UnitTests/Common/BusyLoopTest.cpp b/Source/UnitTests/Common/BusyLoopTest.cpp
index 2dc254b8d6..4108876aad 100644
--- a/Source/UnitTests/Common/BusyLoopTest.cpp
+++ b/Source/UnitTests/Common/BusyLoopTest.cpp
@@ -16,7 +16,7 @@ TEST(BusyLoopTest, MultiThreaded)
for (int i = 0; i < 10; i++)
{
loop.Prepare();
- std::thread loop_thread([&]() { loop.Run([&]() { e.Set(); }); });
+ std::thread loop_thread([&] { loop.Run([&] { e.Set(); }); });
// Ping - Pong
for (int j = 0; j < 10; j++)
diff --git a/Source/UnitTests/Common/EventTest.cpp b/Source/UnitTests/Common/EventTest.cpp
index f04fe9f45a..86cf46d62b 100644
--- a/Source/UnitTests/Common/EventTest.cpp
+++ b/Source/UnitTests/Common/EventTest.cpp
@@ -14,7 +14,7 @@ TEST(Event, MultiThreaded)
int shared_obj;
constexpr int ITERATIONS_COUNT = 100000;
- auto sender = [&]() {
+ auto sender = [&] {
for (int i = 0; i < ITERATIONS_COUNT; ++i)
{
can_send.Wait();
@@ -23,7 +23,7 @@ TEST(Event, MultiThreaded)
}
};
- auto receiver = [&]() {
+ auto receiver = [&] {
for (int i = 0; i < ITERATIONS_COUNT; ++i)
{
has_sent.Wait();
diff --git a/Source/UnitTests/Common/FlagTest.cpp b/Source/UnitTests/Common/FlagTest.cpp
index 23aba5f60d..ccd8b00055 100644
--- a/Source/UnitTests/Common/FlagTest.cpp
+++ b/Source/UnitTests/Common/FlagTest.cpp
@@ -36,7 +36,7 @@ TEST(Flag, MultiThreaded)
int count = 0;
constexpr int ITERATIONS_COUNT = 100000;
- auto setter = [&]() {
+ auto setter = [&] {
for (int i = 0; i < ITERATIONS_COUNT; ++i)
{
while (f.IsSet())
@@ -45,7 +45,7 @@ TEST(Flag, MultiThreaded)
}
};
- auto clearer = [&]() {
+ auto clearer = [&] {
for (int i = 0; i < ITERATIONS_COUNT; ++i)
{
while (!f.IsSet())
@@ -72,7 +72,7 @@ TEST(Flag, SpinLock)
constexpr int ITERATIONS_COUNT = 5000;
constexpr int THREADS_COUNT = 50;
- auto adder_func = [&]() {
+ auto adder_func = [&] {
for (int i = 0; i < ITERATIONS_COUNT; ++i)
{
// Acquire the spinlock.
diff --git a/Source/UnitTests/Common/SPSCQueueTest.cpp b/Source/UnitTests/Common/SPSCQueueTest.cpp
index 93b3e584fd..13848bd95f 100644
--- a/Source/UnitTests/Common/SPSCQueueTest.cpp
+++ b/Source/UnitTests/Common/SPSCQueueTest.cpp
@@ -61,7 +61,7 @@ TEST(SPSCQueue, MultiThreaded)
constexpr u32 reps = 100000;
- auto inserter = [&]() {
+ auto inserter = [&] {
for (u32 i = 0; i != reps; ++i)
q.Push({sptr, i});
@@ -71,7 +71,7 @@ TEST(SPSCQueue, MultiThreaded)
EXPECT_EQ(sptr.use_count(), 2);
};
- auto popper = [&]() {
+ auto popper = [&] {
for (u32 i = 0; i != reps; ++i)
{
q.WaitForData();