From 25c6795d0c648a524190d7c84a5a3a5d5fee4593 Mon Sep 17 00:00:00 2001 From: Christian Grasser Date: Sun, 14 Apr 2024 21:46:02 +0200 Subject: [PATCH] Code enhancements MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - fix linux build on include upper/lowercase issue ../src/dpiManagerV2.cpp:20:10: fatal error: CommCtrl.h: No such file or directory - avoid clang warning: 5>..\src\WinControls\Grid\BabyGrid.cpp(677,7): warning : unused variable 'rectwhole' [-Wunused-variable] - avoid ../src/NppCommands.cpp:1790:24: warning: conversion from ‘int’ to ‘UCHAR’ {aka ‘unsigned char’} may change value [-Wconversion] Close #15001 --- PowerEditor/src/NppCommands.cpp | 2 +- PowerEditor/src/WinControls/Grid/BabyGrid.cpp | 1 - PowerEditor/src/dpiManagerV2.cpp | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/PowerEditor/src/NppCommands.cpp b/PowerEditor/src/NppCommands.cpp index 6496caba5..411b7ccf1 100644 --- a/PowerEditor/src/NppCommands.cpp +++ b/PowerEditor/src/NppCommands.cpp @@ -1787,7 +1787,7 @@ void Notepad_plus::command(int id) ::SendMessage(_pPublicInterface->getHSelf(), WM_SIZE, 0, 0); udd->display(false); - _mainWindowStatus &= ~WindowUserActive; + _mainWindowStatus &= static_cast(~WindowUserActive); } else if ((isUDDlgDocked)&&(!isUDDlgVisible)) { diff --git a/PowerEditor/src/WinControls/Grid/BabyGrid.cpp b/PowerEditor/src/WinControls/Grid/BabyGrid.cpp index 3e499772a..ce7db1868 100644 --- a/PowerEditor/src/WinControls/Grid/BabyGrid.cpp +++ b/PowerEditor/src/WinControls/Grid/BabyGrid.cpp @@ -674,7 +674,6 @@ void DrawCursor(HWND hWnd, int SI) if (BGHS[SI].cursorcol < BGHS[SI].homecol) { return; } rect = GetCellRect(hWnd, SI, BGHS[SI].cursorrow, BGHS[SI].cursorcol); - RECT rectwhole = rect; HDC gdc = GetDC(hWnd); BGHS[SI].activecellrect = rect; int rop = GetROP2(gdc); diff --git a/PowerEditor/src/dpiManagerV2.cpp b/PowerEditor/src/dpiManagerV2.cpp index 0a967ba99..611e80abd 100644 --- a/PowerEditor/src/dpiManagerV2.cpp +++ b/PowerEditor/src/dpiManagerV2.cpp @@ -17,7 +17,7 @@ #include "dpiManagerV2.h" -#include +#include #if defined(__GNUC__) && __GNUC__ > 8