Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

refactor: Remove unused variable "tapTimes" from multi_touch_tap_detector_test.dart #2379

Merged
merged 2 commits into from
Mar 1, 2023

Conversation

luanpotter
Copy link
Member

@luanpotter luanpotter commented Mar 1, 2023

Description

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.

Checklist

  • I have followed the Contributor Guide when preparing my PR.
  • I have updated/added tests for ALL new/updated/fixed functionality.
  • I have updated/added relevant documentation in docs and added dartdoc comments with ///.
  • I have updated/added relevant examples in examples or docs.

Breaking Change?

  • Yes, this PR is a breaking change.
  • No, this PR is not a breaking change.

@luanpotter luanpotter marked this pull request as ready for review March 1, 2023 02:43
@spydon spydon enabled auto-merge (squash) March 1, 2023 09:32
@spydon spydon merged commit cd2b2a1 into main Mar 1, 2023
@spydon spydon deleted the luan.unused-3 branch March 1, 2023 09:40
st-pasha pushed a commit that referenced this pull request Mar 2, 2023
…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
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants