From edb7369a2c6a19393dc413a9595a234969fc2731 Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 3 Apr 2025 10:07:20 +1100 Subject: 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. --- win32/ScintillaWin.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'win32') 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 { -- cgit v1.2.3