Skip to content

Commit 119fdfa

Browse files
author
pioner921227
committed
refactoring
1 parent a3f645b commit 119fdfa

File tree

14 files changed

+149
-146
lines changed

14 files changed

+149
-146
lines changed

cpp/JSManager.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
//
77

88
#include "JSManager.hpp"
9-
#include "TaskScheduler.h"
10-
#include "constants.h"
9+
#include "TaskScheduler.hpp"
10+
#include "constants.hpp"
1111
#include "helpers/helpers.h"
1212

1313
jsi::Object createJSTaskManager(jsi::Runtime& rt) {

cpp/JSManager.hpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,10 @@
88
#ifndef JSManager_hpp
99
#define JSManager_hpp
1010

11-
#include <stdio.h>
12-
13-
1411
#include "jsi/jsi.h"
1512

16-
using namespace facebook;
17-
1813

19-
jsi::Object createJSTaskManager(jsi::Runtime& rt);
14+
facebook::jsi::Object createJSTaskManager(facebook::jsi::Runtime& rt);
2015

2116

2217

cpp/JSTask.cpp

Lines changed: 118 additions & 115 deletions
Large diffs are not rendered by default.

cpp/JSTask.hpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,11 @@
88
#ifndef JSTask_hpp
99
#define JSTask_hpp
1010

11-
#include <stdio.h>
12-
1311
#include "jsi/jsi.h"
1412
#include <ReactCommon/CallInvoker.h>
1513

16-
using namespace facebook;
1714

18-
jsi::Function createJSTaskCreator(jsi::Runtime& rt,std::shared_ptr<react::CallInvoker> callInvoker);
15+
facebook::jsi::Function createJSTaskCreator(facebook::jsi::Runtime& rt,
16+
std::shared_ptr<facebook::react::CallInvoker> callInvoker);
1917

2018
#endif /* JSTask_hpp */
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include "jsi/jsi.h"
1313
#include "queue"
1414
#include "thread"
15+
#include "constants.hpp"
1516

1617
using namespace std;
1718
using namespace facebook;
File renamed without changes.

cpp/helpers/fetch.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
#pragma once
99

1010
#include <curl/curl.h>
11-
#include <tuple>
12-
#include <iostream>
11+
1312

1413
using namespace std;
1514

cpp/helpers/helpers.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,17 @@
99

1010
#include "jsi/jsi.h"
1111

12-
using namespace facebook;
13-
1412

1513
template<typename T>
16-
inline bool checkJSType(jsi::Runtime& rt, const jsi::Value& val);
14+
inline bool checkJSType(facebook::jsi::Runtime& rt, const facebook::jsi::Value& val);
1715

1816
template<>
19-
inline bool checkJSType<jsi::Function>(jsi::Runtime& rt, const jsi::Value& val) {
17+
inline bool checkJSType<facebook::jsi::Function>(facebook::jsi::Runtime& rt, const facebook::jsi::Value& val) {
2018
return val.isObject() && val.asObject(rt).isFunction(rt);
2119
};
2220

2321
template<>
24-
inline bool checkJSType<jsi::Array>(jsi::Runtime& rt, const jsi::Value& val) {
22+
inline bool checkJSType<facebook::jsi::Array>(facebook::jsi::Runtime& rt, const facebook::jsi::Value& val) {
2523
return val.isObject() && val.asObject(rt).isArray(rt);
2624
};
2725

cpp/react-native-sync-tasks.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
#include "react-native-sync-tasks.h"
1+
#include "react-native-sync-tasks.hpp"
22
#include "JSManager.hpp"
33
#include "JSTask.hpp"
4-
#include "constants.h"
4+
#include "constants.hpp"
55

66

77
using namespace sh;

0 commit comments

Comments
 (0)