Skip to content

Commit

Permalink
Fix clang-tidy suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
Gasparoken committed May 17, 2024
1 parent 0a79626 commit c917d68
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions src/app/commands/cmd_keyboard_shortcuts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -586,23 +586,19 @@ class KeyboardShortcutsWindow : public app::gen::KeyboardShortcuts {
deleteList(dragActions());
}

bool skipCommand(KeyItem* keyItem) {
static bool skipCommand(KeyItem* keyItem) {
auto toIndexed = fmt::format(
Strings::commands_ChangePixelFormat(),
Strings::commands_ChangePixelFormat_Indexed());

if ((keyItem->text() == Strings::commands_OpenFile() ||
keyItem->text() == Strings::commands_Flip_Horizontally() ||
keyItem->text() == Strings::commands_ExportSpriteSheet() ||
keyItem->text() == Strings::commands_ExportSpriteSheet()) && !keyItem->key()->params().empty() ||
keyItem->text() == Strings::commands_Launch() ||
keyItem->text() == Strings::commands_OpenBrowser() ||
keyItem->text() == Strings::commands_SavePalette() ||
(keyItem->text() == toIndexed && keyItem->key()->params().size() > 1) ||
(keyItem->text() == Strings::commands_RunScript() && keyItem->key()->params().empty()))
return true;
else
return false;
return (keyItem->text() == Strings::commands_OpenFile() ||
keyItem->text() == Strings::commands_Flip_Horizontally() ||
keyItem->text() == Strings::commands_ExportSpriteSheet() ||
keyItem->text() == Strings::commands_ExportSpriteSheet()) && !keyItem->key()->params().empty() ||
keyItem->text() == Strings::commands_Launch() ||
keyItem->text() == Strings::commands_OpenBrowser() ||
keyItem->text() == Strings::commands_SavePalette() ||
(keyItem->text() == toIndexed && keyItem->key()->params().size() > 1) ||
(keyItem->text() == Strings::commands_RunScript() && keyItem->key()->params().empty());
}

void fillAllLists() {
Expand Down

0 comments on commit c917d68

Please sign in to comment.