Skip to content

chore: code cleanup#17

Merged
codepuncher merged 4 commits into
mainfrom
chore/cpp-cleanup
May 18, 2026
Merged

chore: code cleanup#17
codepuncher merged 4 commits into
mainfrom
chore/cpp-cleanup

Conversation

@codepuncher
Copy link
Copy Markdown
Owner

Code cleanup

@codepuncher codepuncher marked this pull request as ready for review May 18, 2026 20:25
Copilot AI review requested due to automatic review settings May 18, 2026 20:25
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors small pieces of plugin configuration parsing and input handling to reduce ad-hoc types and avoid unnecessary work, without changing the user-facing behavior of QuickMap’s trigger button handling.

Changes:

  • Replaced std::pair return from ReadButton() with a small ButtonDef struct and returned map values directly.
  • Removed redundant deleted move operations from InputHandler and marked SetButton as noexcept.
  • Avoided computing “held duration” on button release when a long-press already triggered the map, and moved _pressTime.reset() to after dispatch.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/Plugin.cpp Introduces ButtonDef for button config parsing and returns structured values directly.
src/InputHandler.h Removes redundant move-deletes and updates SetButton signature to noexcept.
src/InputHandler.cpp Updates SetButton definition and streamlines button-up handling to skip unused duration computation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codepuncher codepuncher merged commit 58c6112 into main May 18, 2026
12 checks passed
@codepuncher codepuncher deleted the chore/cpp-cleanup branch May 18, 2026 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants