From c304b3b873d61d0a8bc985dd004ef6c723927328 Mon Sep 17 00:00:00 2001 From: Oleksandr Redko Date: Sun, 29 Oct 2017 18:12:56 +0200 Subject: [PATCH] Fix static analyzer message "The ternary operator always returns constant" V583 The '?:' operator, regardless of its conditional expression, always returns one and the same value: 22. nppcommands.cpp 1696 --- PowerEditor/src/NppCommands.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PowerEditor/src/NppCommands.cpp b/PowerEditor/src/NppCommands.cpp index ed497322c..8baae384d 100644 --- a/PowerEditor/src/NppCommands.cpp +++ b/PowerEditor/src/NppCommands.cpp @@ -1693,7 +1693,7 @@ void Notepad_plus::command(int id) TabBarPlus::setDrawTabCloseButton(!TabBarPlus::drawTabCloseButton()); // This part is just for updating (redraw) the tabs - int tabDpiDynamicalHeight = NppParameters::getInstance()->_dpiManager.scaleY(TabBarPlus::drawTabCloseButton() ? 22 : 22); + int tabDpiDynamicalHeight = NppParameters::getInstance()->_dpiManager.scaleY(22); int tabDpiDynamicalWidth = NppParameters::getInstance()->_dpiManager.scaleX(TabBarPlus::drawTabCloseButton() ? 60 : 45); TabCtrl_SetItemSize(_mainDocTab.getHSelf(), tabDpiDynamicalWidth, tabDpiDynamicalHeight); TabCtrl_SetItemSize(_subDocTab.getHSelf(), tabDpiDynamicalWidth, tabDpiDynamicalHeight);