diff options
| author | Neil <nyamatongwe@gmail.com> | 2025-04-03 10:07:20 +1100 |
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2025-04-03 10:07:20 +1100 |
| commit | edb7369a2c6a19393dc413a9595a234969fc2731 (patch) | |
| tree | 1dd7de2ad759c58d48606bd8a204503944feec12 /src/DBCS.cxx | |
| parent | f40a7ce87a20e830a4959e33238d2caadef0ea04 (diff) | |
| download | scintilla-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 'src/DBCS.cxx')
| -rw-r--r-- | src/DBCS.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/DBCS.cxx b/src/DBCS.cxx index 0f22a705a..f53b8e9ed 100644 --- a/src/DBCS.cxx +++ b/src/DBCS.cxx @@ -16,6 +16,12 @@ using namespace Scintilla::Internal; namespace Scintilla::Internal { +// Silence 'magic' number use since the set of DBCS lead and trail bytes differ +// between encodings and would require many constant declarations that would just +// obscure the behaviour. + +// NOLINTBEGIN(*-magic-numbers) + bool DBCSIsLeadByte(int codePage, char ch) noexcept { // Byte ranges found in Wikipedia articles with relevant search strings in each case const unsigned char uch = ch; @@ -91,6 +97,8 @@ bool IsDBCSValidSingleByte(int codePage, int ch) noexcept { } } +// NOLINTEND(*-magic-numbers) + using CodePageToFoldMap = std::map<int, FoldMap>; CodePageToFoldMap cpToFoldMap; |
