diff options
author | Neil <nyamatongwe@gmail.com> | 2025-03-27 19:35:43 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2025-03-27 19:35:43 +1100 |
commit | ceaa07a1bc4d05a89218d09bd5c5c3ce411845d5 (patch) | |
tree | bda153bd3f2920efbcb1159470773283db84879e /src/DBCS.h | |
parent | c2189f99d1781b4d676ea9741052df353e0180bd (diff) | |
download | scintilla-mirror-ceaa07a1bc4d05a89218d09bd5c5c3ce411845d5.tar.gz |
Use constant definitions to avoid warnings.
Diffstat (limited to 'src/DBCS.h')
-rw-r--r-- | src/DBCS.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/DBCS.h b/src/DBCS.h index ceeb75929..01830c843 100644 --- a/src/DBCS.h +++ b/src/DBCS.h @@ -10,12 +10,18 @@ namespace Scintilla::Internal { +constexpr int cp932 = 932; +constexpr int cp936 = 936; +constexpr int cp949 = 949; +constexpr int cp950 = 950; +constexpr int cp1361 = 1361; + constexpr bool IsDBCSCodePage(int codePage) noexcept { - return codePage == 932 - || codePage == 936 - || codePage == 949 - || codePage == 950 - || codePage == 1361; + return codePage == cp932 + || codePage == cp936 + || codePage == cp949 + || codePage == cp950 + || codePage == cp1361; } bool DBCSIsLeadByte(int codePage, char ch) noexcept; |