aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Document.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Document.cxx')
-rw-r--r--src/Document.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Document.cxx b/src/Document.cxx
index 5dd64eed9..ddcf43276 100644
--- a/src/Document.cxx
+++ b/src/Document.cxx
@@ -1109,6 +1109,12 @@ bool SCI_METHOD Document::IsDBCSLeadByte(char ch) const {
return IsDBCSLeadByteNoExcept(ch);
}
+// 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 Document::IsDBCSLeadByteNoExcept(char ch) const noexcept {
// Used inside core Scintilla
// Byte ranges found in Wikipedia articles with relevant search strings in each case
@@ -1192,6 +1198,8 @@ unsigned char Document::DBCSMinTrailByte() const noexcept {
}
}
+// NOLINTEND(*-magic-numbers)
+
int Document::DBCSDrawBytes(std::string_view text) const noexcept {
if (text.length() <= 1) {
return static_cast<int>(text.length());