Skip to content

Commit 6cdc705

Browse files
ptomatoedusperoni
authored andcommitted
chore: Remove unused code from Timers
These were highlighted in the Android Studio diagnostics view. IsScheduled() is never used because when looking up an ID in the timer map, we always need the iterator later on. The dispose field is never accessed.
1 parent 3e40d87 commit 6cdc705

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

test-app/runtime/src/main/cpp/Timers.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ namespace tns {
4040
args_.reset();
4141
isolate_ = nullptr;
4242
queued_ = false;
43-
disposed = true;
4443
}
4544

4645
int nestingLevel_ = 0;
@@ -59,7 +58,6 @@ namespace tns {
5958
double dueTime_ = -1;
6059
double startTime_ = -1;
6160
int id_;
62-
bool disposed = false;
6361
};
6462

6563
struct TimerReference {
@@ -110,11 +108,6 @@ namespace tns {
110108

111109
void removeTask(const int &taskId);
112110

113-
inline bool IsScheduled(const int &id) {
114-
auto it = timerMap_.find(id);
115-
return it != timerMap_.end();
116-
}
117-
118111
v8::Isolate *isolate_ = nullptr;
119112
ALooper *looper_;
120113
int currentTimerId = 0;

0 commit comments

Comments
 (0)