diff options
author | Neil <nyamatongwe@gmail.com> | 2020-04-10 09:33:32 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2020-04-10 09:33:32 +1000 |
commit | 31f2cb61f1bfb507c7420a1b79349db129bad52c (patch) | |
tree | b505021af781fa235637800d4a26e65d036f72d3 | |
parent | b68733559771e8b8b5d322de54ea4c3bb1c37758 (diff) | |
download | scintilla-mirror-31f2cb61f1bfb507c7420a1b79349db129bad52c.tar.gz |
Backport: Fix some warnings from Clang-Tidy.
Backport of changeset 8135:463c3cd3d8b2, but without [[maybe_unused]], which is C++17 only.
-rw-r--r-- | qt/ScintillaEditBase/ScintillaQt.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/qt/ScintillaEditBase/ScintillaQt.cpp b/qt/ScintillaEditBase/ScintillaQt.cpp index 3c62ec7fd..25fea5b7d 100644 --- a/qt/ScintillaEditBase/ScintillaQt.cpp +++ b/qt/ScintillaEditBase/ScintillaQt.cpp @@ -486,9 +486,9 @@ bool ScintillaQt::ChangeIdle(bool on) idler.state = false; qIdle = static_cast<QTimer *>(idler.idlerID); qIdle->stop(); - disconnect(qIdle, SIGNAL(timeout()), 0, 0); + disconnect(qIdle, SIGNAL(timeout()), nullptr, nullptr); delete qIdle; - idler.idlerID = 0; + idler.idlerID = {}; } } return true; @@ -572,7 +572,7 @@ CaseFolder *ScintillaQt::CaseFolderForEncoding() // Only for single byte encodings for (int i=0x80; i<0x100; i++) { char sCharacter[2] = "A"; - sCharacter[0] = i; + sCharacter[0] = static_cast<char>(i); QString su = codec->toUnicode(sCharacter, 1); QString suFolded = su.toCaseFolded(); if (codec->canEncode(suFolded)) { @@ -587,7 +587,7 @@ CaseFolder *ScintillaQt::CaseFolderForEncoding() return new CaseFolderDBCS(QTextCodec::codecForName(charSetBuffer)); } } - return 0; + return nullptr; } } |