17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 07:29:20 +02:00

refactor(sonar): reduce enum qualification with using enum (cpp:S6177)

Applied only where no unqualified name in the block could be captured by
the introduced enumerators.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
jerrrrycho
2026-10-10 16:49:01 +02:00
parent a47c2a6ea0
commit 8afb232f2a
14 changed files with 887 additions and 846 deletions

View File

@@ -328,6 +328,7 @@ keyboard_input::key( int const Key ) const {
void
keyboard_input::bind() {
using enum user_command;
m_bindings.clear();
for( auto const &[setupcommand, setupbinding] : m_bindingsetups ) {
@@ -336,12 +337,12 @@ keyboard_input::bind() {
}
// cache movement key bindings
m_bindingscache.forward = binding( user_command::moveforward );
m_bindingscache.back = binding( user_command::moveback );
m_bindingscache.left = binding( user_command::moveleft );
m_bindingscache.right = binding( user_command::moveright );
m_bindingscache.up = binding( user_command::moveup );
m_bindingscache.down = binding( user_command::movedown );
m_bindingscache.forward = binding( moveforward );
m_bindingscache.back = binding( moveback );
m_bindingscache.left = binding( moveleft );
m_bindingscache.right = binding( moveright );
m_bindingscache.up = binding( moveup );
m_bindingscache.down = binding( movedown );
}
int