Skip to content

Commit

Permalink
clang-tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
mikekazakov committed Dec 23, 2024
1 parent b2318ea commit d545ebd
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ - (IBAction)OnMenuToggleAdminMode:(id) [[maybe_unused]] _sender
- (BOOL)validateMenuItem:(NSMenuItem *)item
{
static const int admin_mode_tag =
nc::core::ActionsShortcutsManager::Instance().TagFromAction("menu.nimble_commander.toggle_admin_mode").value();
nc::core::ActionsShortcutsManager::TagFromAction("menu.nimble_commander.toggle_admin_mode").value();
const long tag = item.tag;

if( tag == admin_mode_tag ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ - (IBAction)OnFileInternalBigViewCommand:(id)sender
- (BOOL)validateMenuItem:(NSMenuItem *)item
{
const long tag = item.tag;
static const int close_tag = nc::core::ActionsShortcutsManager::Instance().TagFromAction("menu.file.close").value();
static const int close_tag = nc::core::ActionsShortcutsManager::TagFromAction("menu.file.close").value();
if( tag == close_tag ) {
item.title = NSLocalizedString(@"Close Viewer", "Menu item title for closing internal viewer state");
return true;
Expand Down
4 changes: 2 additions & 2 deletions Source/NimbleCommander/NimbleCommander/States/MainWindow.mm
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,14 @@ - (BOOL)validateMenuItem:(NSMenuItem *)item
{
const long tag = item.tag;

static const int close_tag = nc::core::ActionsShortcutsManager::Instance().TagFromAction("menu.file.close").value();
static const int close_tag = nc::core::ActionsShortcutsManager::TagFromAction("menu.file.close").value();
if( tag == close_tag ) {
item.title = g_CloseWindowTitle;
return true;
}

static const int close_window_tag =
nc::core::ActionsShortcutsManager::Instance().TagFromAction("menu.file.close_window").value();
nc::core::ActionsShortcutsManager::TagFromAction("menu.file.close_window").value();
if( tag == close_window_tag ) {
item.hidden = true;
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ - (BOOL)validateMenuItem:(NSMenuItem *)item
const long tag = item.tag;

static const int show_toolbal_tag =
nc::core::ActionsShortcutsManager::Instance().TagFromAction("menu.view.show_toolbar").value();
nc::core::ActionsShortcutsManager::TagFromAction("menu.view.show_toolbar").value();
if( tag == show_toolbal_tag ) {
item.title = self.toolbarVisible ? g_HideToolbarTitle : g_ShowToolbarTitle;
return self.window.toolbar != nil;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ - (IBAction)OnShowTerminal:(id) [[maybe_unused]] _sender
- (BOOL)validateMenuItem:(NSMenuItem *)item
{
static const int show_terminal_tag =
nc::core::ActionsShortcutsManager::Instance().TagFromAction("menu.view.show_terminal").value();
nc::core::ActionsShortcutsManager::TagFromAction("menu.view.show_terminal").value();
const long tag = item.tag;
if( tag == show_terminal_tag ) {
item.title = NSLocalizedString(@"Hide Terminal", "Menu item title for hiding terminal");
Expand Down

0 comments on commit d545ebd

Please sign in to comment.