mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Clang format for all React Native files
Summary: Buckle up, this enables clang-format prettifier for all files in React Native opensource repo. Changelog: [Internal] Clang-format codemod. Reviewed By: mdvacca Differential Revision: D20331210 fbshipit-source-id: 8da0f94700be0c35bfd399e0c48f1706de04f5b1
This commit is contained in:
committed by
Facebook Github Bot
parent
a426c8dc77
commit
d0871d0a9a
@@ -18,27 +18,30 @@ namespace react {
|
||||
// adapter does the work.
|
||||
|
||||
class DispatchMessageQueueThread : public MessageQueueThread {
|
||||
public:
|
||||
DispatchMessageQueueThread(RCTModuleData *moduleData)
|
||||
: moduleData_(moduleData) {}
|
||||
public:
|
||||
DispatchMessageQueueThread(RCTModuleData *moduleData) : moduleData_(moduleData) {}
|
||||
|
||||
void runOnQueue(std::function<void()>&& func) override {
|
||||
void runOnQueue(std::function<void()> &&func) override
|
||||
{
|
||||
dispatch_queue_t queue = moduleData_.methodQueue;
|
||||
dispatch_block_t block = [func=std::move(func)] { func(); };
|
||||
dispatch_block_t block = [func = std::move(func)] { func(); };
|
||||
RCTAssert(block != nullptr, @"Invalid block generated in call to %@", moduleData_);
|
||||
if (queue && block) {
|
||||
dispatch_async(queue, block);
|
||||
}
|
||||
}
|
||||
void runOnQueueSync(std::function<void()>&& __unused func) override {
|
||||
void runOnQueueSync(std::function<void()> &&__unused func) override
|
||||
{
|
||||
LOG(FATAL) << "Unsupported operation";
|
||||
}
|
||||
void quitSynchronous() override {
|
||||
void quitSynchronous() override
|
||||
{
|
||||
LOG(FATAL) << "Unsupported operation";
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
RCTModuleData *moduleData_;
|
||||
};
|
||||
|
||||
} }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user