Formatting Objective-C and Objective-C++ (#2492)

This commit is contained in:
Bart Louwers
2024-06-11 19:01:50 +02:00
committed by GitHub
parent 7437d800f6
commit 7b09da234a
153 changed files with 3099 additions and 2694 deletions

View File

@@ -13,17 +13,7 @@ public:
: task(std::move(fn)),
loop(CFRunLoopGetCurrent()) {
CFRunLoopSourceContext context = {
0,
this,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
perform
};
0, this, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, perform};
source = CFRunLoopSourceCreate(kCFAllocatorDefault, 0, &context);
CFRunLoopAddSource(loop, source, kCFRunLoopCommonModes);
}
@@ -46,9 +36,7 @@ public:
}
private:
static void perform(void* info) {
reinterpret_cast<Impl*>(info)->runTask();
}
static void perform(void* info) { reinterpret_cast<Impl*>(info)->runTask(); }
std::function<void()> task;
std::atomic_flag queued = ATOMIC_FLAG_INIT;
@@ -58,8 +46,7 @@ private:
};
AsyncTask::AsyncTask(std::function<void()>&& fn)
: impl(std::make_unique<Impl>(std::move(fn))) {
}
: impl(std::make_unique<Impl>(std::move(fn))) {}
AsyncTask::~AsyncTask() = default;