Skip to content

Commit

Permalink
refactor: Remove unused variable "tapTimes" from multi_touch_tap_dete…
Browse files Browse the repository at this point in the history
…ctor_test.dart (#2379)

This is a cleanup identified on this issue: #2308
Using an amazing unused-code tooling
Now, since Flame is a public API, unused code might not be trivial - it might just mean untested code.

This one was a no-brainer -- the variable was clearly replaced by specific counters during the writing of the test and forgotten there:

  int nOnTapDown = 0;
  int nOnLongTapDown = 0;
  int nOnTapUp = 0;
  int nOnTap = 0;
  int nOnTapCancel = 0;

It wasn't even increment and the taps are already thoroughly tested more granularly
  • Loading branch information
luanpotter committed Mar 1, 2023
1 parent 1431e60 commit cd2b2a1
Showing 1 changed file with 0 additions and 1 deletion.
Expand Up @@ -88,7 +88,6 @@ void main() {
}

class _GameWithMultiTouchTapDetector extends Game with MultiTouchTapDetector {
int tapTimes = 0;
bool updated = false;
bool rendered = false;

Expand Down

0 comments on commit cd2b2a1

Please sign in to comment.