From ceaa07a1bc4d05a89218d09bd5c5c3ce411845d5 Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 27 Mar 2025 19:35:43 +1100 Subject: Use constant definitions to avoid warnings. --- src/DBCS.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/DBCS.cxx') diff --git a/src/DBCS.cxx b/src/DBCS.cxx index e3ae3d75f..d5512cc14 100644 --- a/src/DBCS.cxx +++ b/src/DBCS.cxx @@ -15,21 +15,21 @@ 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; switch (codePage) { - case 932: + case cp932: // Shift_jis return ((uch >= 0x81) && (uch <= 0x9F)) || ((uch >= 0xE0) && (uch <= 0xFC)); // Lead bytes F0 to FC may be a Microsoft addition. - case 936: + case cp936: // GBK return (uch >= 0x81) && (uch <= 0xFE); - case 949: + case cp949: // Korean Wansung KS C-5601-1987 return (uch >= 0x81) && (uch <= 0xFE); - case 950: + case cp950: // Big5 return (uch >= 0x81) && (uch <= 0xFE); - case 1361: + case cp1361: // Korean Johab KS C-5601-1992 return ((uch >= 0x84) && (uch <= 0xD3)) || @@ -41,7 +41,7 @@ bool DBCSIsLeadByte(int codePage, char ch) noexcept { bool IsDBCSValidSingleByte(int codePage, int ch) noexcept { switch (codePage) { - case 932: + case cp932: return ch == 0x80 || (ch >= 0xA0 && ch <= 0xDF) || (ch >= 0xFD); -- cgit v1.2.3