Remove more cast

This commit is contained in:
Don Ho 2022-01-22 14:23:25 +01:00
parent 38bf6ecc35
commit 23b8b3edf6
8 changed files with 8 additions and 8 deletions

View File

@ -2014,7 +2014,7 @@ void Notepad_plus::filePrint(bool showDialog)
intptr_t startPos = _pEditView->execute(SCI_GETSELECTIONSTART); intptr_t startPos = _pEditView->execute(SCI_GETSELECTIONSTART);
intptr_t endPos = _pEditView->execute(SCI_GETSELECTIONEND); intptr_t endPos = _pEditView->execute(SCI_GETSELECTIONEND);
printer.init(_pPublicInterface->getHinst(), _pPublicInterface->getHSelf(), _pEditView, showDialog, int(startPos), int(endPos), _nativeLangSpeaker.isRTL()); printer.init(_pPublicInterface->getHinst(), _pPublicInterface->getHSelf(), _pEditView, showDialog, startPos, endPos, _nativeLangSpeaker.isRTL());
printer.doPrint(); printer.doPrint();
} }

View File

@ -388,7 +388,7 @@ void FunctionCallTip::showCalltip()
psize = _overloads.at(i).size()+1; psize = _overloads.at(i).size()+1;
if (_currentParam < psize) if (_currentParam < psize)
{ {
_currentOverload = static_cast<int32_t>(i); _currentOverload = i;
break; break;
} }
} }

View File

@ -27,7 +27,7 @@ void replaceStr(generic_string & str, generic_string str2BeReplaced, generic_str
str.replace(pos, str2BeReplaced.length(), replacement); str.replace(pos, str2BeReplaced.length(), replacement);
} }
void Printer::init(HINSTANCE hInst, HWND hwnd, ScintillaEditView *pSEView, bool showDialog, int startPos, int endPos, bool isRTL) void Printer::init(HINSTANCE hInst, HWND hwnd, ScintillaEditView *pSEView, bool showDialog, size_t startPos, size_t endPos, bool isRTL)
{ {
_pSEView = pSEView; _pSEView = pSEView;
_startPos = startPos; _startPos = startPos;

View File

@ -33,7 +33,7 @@ class Printer
public : public :
Printer() = default; Printer() = default;
void init(HINSTANCE hInst, HWND hwnd, ScintillaEditView *pSEView, bool showDialog, int startPos, int endPos, bool isRTL = false); void init(HINSTANCE hInst, HWND hwnd, ScintillaEditView *pSEView, bool showDialog, size_t startPos, size_t endPos, bool isRTL = false);
size_t doPrint() { size_t doPrint() {
if (!::PrintDlg(&_pdlg)) if (!::PrintDlg(&_pdlg))
return 0; return 0;

View File

@ -170,7 +170,7 @@ intptr_t CALLBACK ColumnEditorDlg::run_dlgProc(UINT message, WPARAM wParam, LPAR
s2r.insert(posRelative2Start, str); s2r.insert(posRelative2Start, str);
} }
(*_ppEditView)->replaceTarget(s2r.c_str(), int(lineBegin), int(lineEnd)); (*_ppEditView)->replaceTarget(s2r.c_str(), lineBegin, lineEnd);
} }
delete [] line; delete [] line;
} }

View File

@ -270,7 +270,7 @@ void DocumentMap::scrollMapWith(const MapPosition & mapPos)
} }
else else
{ {
higherY = _pMapView->execute(SCI_POINTYFROMPOSITION, 0, static_cast<int32_t>(mapPos._higherPos)); higherY = _pMapView->execute(SCI_POINTYFROMPOSITION, 0, mapPos._higherPos);
auto lineHeight = _pMapView->execute(SCI_TEXTHEIGHT, mapPos._firstVisibleDocLine); auto lineHeight = _pMapView->execute(SCI_TEXTHEIGHT, mapPos._firstVisibleDocLine);
lowerY = mapPos._nbLine * lineHeight + higherY; lowerY = mapPos._nbLine * lineHeight + higherY;
} }

View File

@ -79,7 +79,7 @@ size_t FunctionListPanel::getBodyClosePos(size_t begin, const TCHAR *bodyOpenSym
size_t docLen = (*_ppEditView)->getCurrentDocLen(); size_t docLen = (*_ppEditView)->getCurrentDocLen();
if (begin >= (size_t)docLen) if (begin >= docLen)
return docLen; return docLen;
generic_string exprToSearch = TEXT("("); generic_string exprToSearch = TEXT("(");

View File

@ -661,7 +661,7 @@ void FunctionParser::getInvertZones(vector< pair<size_t, size_t> > & destZones,
else else
{ {
// check the begin // check the begin
if (int(begin) < sourceZones[0].first) if (begin < sourceZones[0].first)
{ {
destZones.push_back(pair<size_t, size_t>(begin, sourceZones[0].first - 1)); destZones.push_back(pair<size_t, size_t>(begin, sourceZones[0].first - 1));
} }