diff --git a/PowerEditor/src/NppNotification.cpp b/PowerEditor/src/NppNotification.cpp index fea9965b2..2636d90e6 100644 --- a/PowerEditor/src/NppNotification.cpp +++ b/PowerEditor/src/NppNotification.cpp @@ -805,11 +805,14 @@ BOOL Notepad_plus::notify(SCNotification *notification) case SCN_MACRORECORD: { - _macro.push_back(recordedMacroStep( - notification->message, - static_cast(notification->wParam), - static_cast(notification->lParam), - static_cast(_pEditView->execute(SCI_GETCODEPAGE)))); + _macro.push_back( + recordedMacroStep( + notification->message, + notification->wParam, + notification->lParam, + static_cast(_pEditView->execute(SCI_GETCODEPAGE)) + ) + ); break; } diff --git a/PowerEditor/src/Parameters.cpp b/PowerEditor/src/Parameters.cpp index 4d8879ac1..e87986b86 100644 --- a/PowerEditor/src/Parameters.cpp +++ b/PowerEditor/src/Parameters.cpp @@ -2842,8 +2842,8 @@ void NppParameters::insertMacro(TiXmlNode *macrosRoot, const MacroShortcut & mac const recordedMacroStep & action = macro._macro[i]; actionNode->ToElement()->SetAttribute(TEXT("type"), action._macroType); actionNode->ToElement()->SetAttribute(TEXT("message"), action._message); - actionNode->ToElement()->SetAttribute(TEXT("wParam"), action._wParameter); - actionNode->ToElement()->SetAttribute(TEXT("lParam"), action._lParameter); + actionNode->ToElement()->SetAttribute(TEXT("wParam"), static_cast(action._wParameter)); + actionNode->ToElement()->SetAttribute(TEXT("lParam"), static_cast(action._lParameter)); actionNode->ToElement()->SetAttribute(TEXT("sParam"), action._sParameter.c_str()); } } diff --git a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp index 659b9aea9..8d28efdeb 100644 --- a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp +++ b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp @@ -2283,7 +2283,7 @@ void FindReplaceDlg::setStatusbarMessage(const generic_string & msg, FindStatus } } -void FindReplaceDlg::execSavedCommand(int cmd, int intValue, generic_string stringValue) +void FindReplaceDlg::execSavedCommand(int cmd, uptr_t intValue, generic_string stringValue) { switch(cmd) { @@ -2306,7 +2306,7 @@ void FindReplaceDlg::execSavedCommand(int cmd, int intValue, generic_string stri _env->_dotMatchesNewline = ((intValue & IDF_REDOTMATCHNL)> 0); break; case IDNORMAL: - _env->_searchType = (SearchType)intValue; + _env->_searchType = static_cast(intValue); break; case IDREPLACEWITH: _env->_str4Replace = stringValue; diff --git a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.h b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.h index 95c62e8f6..341f286d9 100644 --- a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.h +++ b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.h @@ -329,7 +329,7 @@ public : } }; - void execSavedCommand(int cmd, int intValue, generic_string stringValue); + void execSavedCommand(int cmd, uptr_t intValue, generic_string stringValue); void setStatusbarMessage(const generic_string & msg, FindStatus staus); Finder * createFinder(); bool removeFinder(Finder *finder2remove); diff --git a/PowerEditor/src/WinControls/shortcut/shortcut.cpp b/PowerEditor/src/WinControls/shortcut/shortcut.cpp index 54d6ccb56..37e2d7744 100644 --- a/PowerEditor/src/WinControls/shortcut/shortcut.cpp +++ b/PowerEditor/src/WinControls/shortcut/shortcut.cpp @@ -616,7 +616,7 @@ void Accelerator::updateMenuItemByCommand(CommandShortcut csc) ::ModifyMenu(_hAccelMenu, cmdID, cmdFlags, cmdID, csc.toMenuItemString().c_str()); } -recordedMacroStep::recordedMacroStep(int iMessage, long wParam, long lParam, int codepage) +recordedMacroStep::recordedMacroStep(int iMessage, uptr_t wParam, uptr_t lParam, int codepage) : _message(iMessage), _wParameter(wParam), _lParameter(lParam), _macroType(mtUseLParameter) { if (_lParameter) { diff --git a/PowerEditor/src/WinControls/shortcut/shortcut.h b/PowerEditor/src/WinControls/shortcut/shortcut.h index 24c1e5947..4eaa924af 100644 --- a/PowerEditor/src/WinControls/shortcut/shortcut.h +++ b/PowerEditor/src/WinControls/shortcut/shortcut.h @@ -273,15 +273,15 @@ struct recordedMacroStep { enum MacroTypeIndex {mtUseLParameter, mtUseSParameter, mtMenuCommand, mtSavedSnR}; int _message = 0; - long _wParameter = 0; - long _lParameter = 0; + uptr_t _wParameter = 0; + uptr_t _lParameter = 0; generic_string _sParameter; MacroTypeIndex _macroType = mtMenuCommand; - recordedMacroStep(int iMessage, long wParam, long lParam, int codepage); + recordedMacroStep(int iMessage, uptr_t wParam, uptr_t lParam, int codepage); explicit recordedMacroStep(int iCommandID): _wParameter(iCommandID) {}; - recordedMacroStep(int iMessage, long wParam, long lParam, const TCHAR *sParam, int type) + recordedMacroStep(int iMessage, uptr_t wParam, uptr_t lParam, const TCHAR *sParam, int type) : _message(iMessage), _wParameter(wParam), _lParameter(lParam), _macroType(MacroTypeIndex(type)){ _sParameter = (sParam)?generic_string(sParam):TEXT(""); };