diff options
author | Neil <nyamatongwe@gmail.com> | 2020-05-20 20:39:10 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2020-05-20 20:39:10 +1000 |
commit | 22628ce86b10f1569bbe4f7aaef4b9c0f56b0b26 (patch) | |
tree | 8e77f4d992925ce81762c56f8a5627dc0eedc0e2 /win32/ScintillaWin.cxx | |
parent | 76fccd8c4d3faf99bc69c19265fe6607e950110d (diff) | |
download | scintilla-mirror-22628ce86b10f1569bbe4f7aaef4b9c0f56b0b26.tar.gz |
Fix some minor warnings.
Diffstat (limited to 'win32/ScintillaWin.cxx')
-rw-r--r-- | win32/ScintillaWin.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index 046ff7f10..bb6dbd101 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -356,7 +356,7 @@ class ScintillaWin : sptr_t HandleCompositionInline(uptr_t wParam, sptr_t lParam); static bool KoreanIME() noexcept; void MoveImeCarets(Sci::Position offset); - void DrawImeIndicator(int indicator, int len); + void DrawImeIndicator(int indicator, Sci::Position len); void SetCandidateWindowPos(); void SelectionToHangul(); void EscapeHanja(); @@ -964,7 +964,7 @@ void ScintillaWin::MoveImeCarets(Sci::Position offset) { } } -void ScintillaWin::DrawImeIndicator(int indicator, int len) { +void ScintillaWin::DrawImeIndicator(int indicator, Sci::Position len) { // Emulate the visual style of IME characters with indicators. // Draw an indicator on the character before caret by the character bytes of len // so it should be called after InsertCharacter(). @@ -1161,7 +1161,7 @@ sptr_t ScintillaWin::HandleCompositionInline(uptr_t, sptr_t lParam) { InsertCharacter(docChar, CharacterSource::tentativeInput); - DrawImeIndicator(imeIndicator[i], static_cast<unsigned int>(docChar.size())); + DrawImeIndicator(imeIndicator[i], docChar.size()); i += ucWidth; } @@ -1546,7 +1546,7 @@ sptr_t ScintillaWin::KeyMessage(unsigned int iMessage, uptr_t wParam, sptr_t lPa return 1; } else { wchar_t wcs[3] = { 0 }; - const unsigned int wclen = UTF16FromUTF32Character(static_cast<unsigned int>(wParam), wcs); + const size_t wclen = UTF16FromUTF32Character(static_cast<unsigned int>(wParam), wcs); AddWString(std::wstring_view(wcs, wclen), CharacterSource::directInput); return FALSE; } @@ -1649,7 +1649,7 @@ sptr_t ScintillaWin::EditMessage(unsigned int iMessage, uptr_t wParam, sptr_t lP if (static_cast<Sci::Position>(wParam) < 0) { wParam = SelectionStart().Position(); } - return pdoc->LineFromPosition(static_cast<Sci::Position>(wParam)); + return pdoc->LineFromPosition(wParam); case EM_EXLINEFROMCHAR: return pdoc->LineFromPosition(lParam); @@ -1674,7 +1674,7 @@ sptr_t ScintillaWin::EditMessage(unsigned int iMessage, uptr_t wParam, sptr_t lP break; case EM_SETSEL: { - Sci::Position nStart = static_cast<Sci::Position>(wParam); + Sci::Position nStart = wParam; Sci::Position nEnd = lParam; if (nStart == 0 && nEnd == -1) { nEnd = pdoc->Length(); @@ -2829,7 +2829,7 @@ void ScintillaWin::ImeStartComposition() { // The negative is to allow for leading lf.lfHeight = -(std::abs(deviceHeight / SC_FONT_SIZE_MULTIPLIER)); lf.lfWeight = vs.styles[styleHere].weight; - lf.lfItalic = static_cast<BYTE>(vs.styles[styleHere].italic ? 1 : 0); + lf.lfItalic = vs.styles[styleHere].italic ? 1 : 0; lf.lfCharSet = DEFAULT_CHARSET; lf.lfFaceName[0] = L'\0'; if (vs.styles[styleHere].fontName) { |