Format all C++ and Java code via clang-format

Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
This commit is contained in:
Konstantin Pastbin
2025-08-17 14:32:37 +07:00
parent 9f0290c0ec
commit bfffa1fff4
2169 changed files with 56441 additions and 64188 deletions

View File

@@ -6,7 +6,6 @@
#include <optional>
#include <thread>
UNIT_TEST(ThreadSafeQueue_ThreadSafeQueue)
{
threads::ThreadSafeQueue<size_t> queue;
@@ -21,11 +20,7 @@ UNIT_TEST(ThreadSafeQueue_Push)
threads::ThreadSafeQueue<size_t> queue;
base::DelayedThreadPool pool(2, base::DelayedThreadPool::Exit::ExecPending);
for (size_t i = 0; i < kSize; ++i)
{
pool.Push([&, i](){
queue.Push(i);
});
}
pool.Push([&, i]() { queue.Push(i); });
pool.ShutdownAndJoin();
@@ -38,7 +33,8 @@ UNIT_TEST(ThreadSafeQueue_WaitAndPop)
threads::ThreadSafeQueue<size_t> queue;
size_t const value = 101;
size_t result;
auto thread = std::thread([&]() {
auto thread = std::thread([&]()
{
std::this_thread::sleep_for(10ms);
queue.Push(value);
});
@@ -56,7 +52,8 @@ UNIT_TEST(ThreadSafeQueue_TryPop)
threads::ThreadSafeQueue<size_t> queue;
size_t const value = 101;
size_t result;
auto thread = std::thread([&]() {
auto thread = std::thread([&]()
{
std::this_thread::sleep_for(10ms);
queue.Push(value);
});
@@ -73,7 +70,8 @@ UNIT_TEST(ThreadSafeQueue_ExampleWithDataWrapper)
size_t const kSize = 100000;
threads::ThreadSafeQueue<std::optional<size_t>> queue;
auto thread = std::thread([&]() {
auto thread = std::thread([&]()
{
while (true)
{
std::optional<size_t> dw;
@@ -87,14 +85,8 @@ UNIT_TEST(ThreadSafeQueue_ExampleWithDataWrapper)
base::DelayedThreadPool pool(4, base::DelayedThreadPool::Exit::ExecPending);
for (size_t i = 0; i < kSize; ++i)
{
pool.Push([&, i](){
queue.Push(i);
});
}
pool.Push([&](){
queue.Push({});
});
pool.Push([&, i]() { queue.Push(i); });
pool.Push([&]() { queue.Push({}); });
thread.join();
}