From a338ed98eb9beadb6c692ae6cb70dcd3820d3b4a Mon Sep 17 00:00:00 2001 From: Eugen Kremer Date: Tue, 5 Jan 2021 02:29:51 +0100 Subject: [PATCH] Fix linker warning --- editor/Editor.cpp | 38 -------------------------------------- editor/Editor.h | Bin 7132 -> 7058 bytes jN.vcxproj | 13 +------------ tests/tests.vcxproj | 7 +++---- 4 files changed, 4 insertions(+), 54 deletions(-) diff --git a/editor/Editor.cpp b/editor/Editor.cpp index 6b857b2..b5318e5 100644 --- a/editor/Editor.cpp +++ b/editor/Editor.cpp @@ -100,44 +100,6 @@ int CEditor::GetMenuItemPosition(HANDLE hMenu, TCHAR* text) return result; } -int CEditor::GetMenuItemPosition(HANDLE hMenu, TCHAR* text) -{ - int count = GetMenuItemCount(m_mainMenu); - int result = count -1; - - MENUITEMINFO mii; - mii.cbSize = sizeof(mii); - mii.fMask = MIIM_STRING; - mii.fType = MFT_STRING; - - size_t len; - if (FAILED(StringCchLength(text, 100, &len))) - return result; - - size_t bufferSize = len + 1 + 1; // one character more + one for \0 - mii.dwTypeData = new TCHAR[bufferSize]; - - for (int i = 0; i < count; i++) { - mii.cch = bufferSize; - - BOOL res = GetMenuItemInfo( - m_mainMenu, - (UINT)i, - TRUE, - &mii - ); - - if (StrCmp(mii.dwTypeData, text) == 0) { - result = i; - break; - } - } - - delete mii.dwTypeData; - - return result; -} - // 1.) NPP uses IDs for menu items but does not offer API // to get new IDs for our dynamic menu items. Due to solve // this problem switch menu message handling from WM_COMMAND to WM_MENUCOMMAND diff --git a/editor/Editor.h b/editor/Editor.h index 8f4c1948908e4f78ac7d4ecc4028d80da30891ea..4af0832322e07834cea8057cbcb3b1c13b660dcd 100644 GIT binary patch delta 12 Tcmca(KFNH82Jhw~-Yh-0 0 10.0 + v143 @@ -38,18 +39,6 @@ Unicode true - - v142 - - - v143 - - - v142 - - - v142 - diff --git a/tests/tests.vcxproj b/tests/tests.vcxproj index 60be12c..9f7fdf7 100644 --- a/tests/tests.vcxproj +++ b/tests/tests.vcxproj @@ -41,12 +41,8 @@ - - - - NotUsing @@ -56,12 +52,15 @@ MultiThreadedDebugDLL MultiThreadedDLL Level3 + true true Console $(MSBuildProjectDirectory)\..\$(Configuration)\*.obj;shlwapi.lib;%(AdditionalDependencies) $(MSBuildProjectDirectory)\..\x64\$(Configuration)\*.obj;shlwapi.lib;%(AdditionalDependencies) + UseLinkTimeCodeGeneration + UseLinkTimeCodeGeneration