aboutsummaryrefslogtreecommitdiffhomepage
path: root/win32
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2025-04-03 10:07:20 +1100
committerNeil <nyamatongwe@gmail.com>2025-04-03 10:07:20 +1100
commitedb7369a2c6a19393dc413a9595a234969fc2731 (patch)
tree1dd7de2ad759c58d48606bd8a204503944feec12 /win32
parentf40a7ce87a20e830a4959e33238d2caadef0ea04 (diff)
downloadscintilla-mirror-edb7369a2c6a19393dc413a9595a234969fc2731.tar.gz
Silence 'magic' number clang-tidy warning where there is intense use of literal
constants for processing character encodings or similar and where declaring constants would make the code more obscure, not less.
Diffstat (limited to 'win32')
-rw-r--r--win32/ScintillaWin.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx
index 5b88b715c..d6ae32736 100644
--- a/win32/ScintillaWin.cxx
+++ b/win32/ScintillaWin.cxx
@@ -1614,6 +1614,10 @@ constexpr bool IsVisualCharacter(wchar_t charCode) noexcept {
namespace Scintilla::Internal {
+// Removing 'magic' numbers here would not help here.
+
+// NOLINTBEGIN(*-magic-numbers)
+
UINT CodePageFromCharSet(CharacterSet characterSet, UINT documentCodePage) noexcept {
if (documentCodePage == CpUtf8) {
return CpUtf8;
@@ -1646,6 +1650,8 @@ UINT CodePageFromCharSet(CharacterSet characterSet, UINT documentCodePage) noexc
return documentCodePage;
}
+// NOLINTEND(*-magic-numbers)
+
}
UINT ScintillaWin::CodePageOfDocument() const noexcept {