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:
Valentin Shergin
2020-03-08 23:01:17 -07:00
committed by Facebook Github Bot
parent a426c8dc77
commit d0871d0a9a
198 changed files with 5524 additions and 5207 deletions
+12 -9
View File
@@ -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_;
};
} }
}
}