diff options
author | Neil <nyamatongwe@gmail.com> | 2021-10-26 08:14:49 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2021-10-26 08:14:49 +1100 |
commit | f3a53bfcf5df26697289e01e041d39a659968ea2 (patch) | |
tree | ddab0de9276721dd1f4d952f2380e58725d916d9 /qt/ScintillaEditBase/ScintillaEditBase.cpp | |
parent | c1c75875711460c2de9c838b5f679dc8d965aea6 (diff) | |
download | scintilla-mirror-f3a53bfcf5df26697289e01e041d39a659968ea2.tar.gz |
Better and fewer casts.
Diffstat (limited to 'qt/ScintillaEditBase/ScintillaEditBase.cpp')
-rw-r--r-- | qt/ScintillaEditBase/ScintillaEditBase.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/qt/ScintillaEditBase/ScintillaEditBase.cpp b/qt/ScintillaEditBase/ScintillaEditBase.cpp index a0a9cd541..984bd29fd 100644 --- a/qt/ScintillaEditBase/ScintillaEditBase.cpp +++ b/qt/ScintillaEditBase/ScintillaEditBase.cpp @@ -109,7 +109,7 @@ sptr_t ScintillaEditBase::sends( uptr_t wParam, const char *s) const { - return sqt->WndProc(static_cast<Message>(iMessage), wParam, (sptr_t)s); + return sqt->WndProc(static_cast<Message>(iMessage), wParam, reinterpret_cast<sptr_t>(s)); } void ScintillaEditBase::scrollHorizontal(int value) @@ -656,7 +656,7 @@ QVariant ScintillaEditBase::inputMethodQuery(Qt::InputMethodQuery query) const { char fontName[64]; int style = send(SCI_GETSTYLEAT, pos); - int len = send(SCI_STYLEGETFONT, style, (sptr_t)fontName); + int len = sends(SCI_STYLEGETFONT, style, fontName); int size = send(SCI_STYLEGETSIZE, style); bool italic = send(SCI_STYLEGETITALIC, style); int weight = send(SCI_STYLEGETBOLD, style) ? QFont::Bold : -1; @@ -683,7 +683,7 @@ QVariant ScintillaEditBase::inputMethodQuery(Qt::InputMethodQuery query) const textRange.chrg = charRange; textRange.lpstrText = buffer.data(); - send(SCI_GETTEXTRANGE, 0, (sptr_t)&textRange); + send(SCI_GETTEXTRANGE, 0, reinterpret_cast<sptr_t>(&textRange)); return sqt->StringFromDocument(buffer.constData()); } @@ -691,7 +691,7 @@ QVariant ScintillaEditBase::inputMethodQuery(Qt::InputMethodQuery query) const case Qt::ImCurrentSelection: { QVarLengthArray<char,1024> buffer(send(SCI_GETSELTEXT)); - send(SCI_GETSELTEXT, 0, (sptr_t)buffer.data()); + sends(SCI_GETSELTEXT, 0, buffer.data()); return sqt->StringFromDocument(buffer.constData()); } |