diff options
Diffstat (limited to 'lexlib/CharacterCategory.cxx')
-rw-r--r-- | lexlib/CharacterCategory.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lexlib/CharacterCategory.cxx b/lexlib/CharacterCategory.cxx index 1e7ae8361..a2b0e0cca 100644 --- a/lexlib/CharacterCategory.cxx +++ b/lexlib/CharacterCategory.cxx @@ -3846,8 +3846,8 @@ const int catRanges[] = { //--Autogenerated -- end of section automatically generated }; -const int maxUnicode = 0x10ffff; -const int maskCategory = 0x1F; +constexpr int maxUnicode = 0x10ffff; +constexpr int maskCategory = 0x1F; } @@ -3880,7 +3880,7 @@ enum class OtherID { oidNone, oidStart, oidContinue }; // Some characters are treated as valid for identifiers even // though most characters from their category are not. // Values copied from http://www.unicode.org/Public/9.0.0/ucd/PropList.txt -OtherID OtherIDOfCharacter(int character) { +OtherID OtherIDOfCharacter(int character) noexcept { if ( (character == 0x1885) || // MONGOLIAN LETTER ALI GALI BALUDA (character == 0x1886) || // MONGOLIAN LETTER ALI GALI THREE BALUDA @@ -3904,11 +3904,11 @@ OtherID OtherIDOfCharacter(int character) { // Pattern_Syntax|Pattern_White_Space. // As of Unicode 9, only VERTICAL TILDE which is in Lm and has Pattern_Syntax matches. // Should really generate from PropList.txt a list of Pattern_Syntax and Pattern_White_Space. -bool IsIdPattern(int character) { +constexpr bool IsIdPattern(int character) noexcept { return character == 0x2E2F; } -bool OmitXidStart(int character) { +bool OmitXidStart(int character) noexcept { switch (character) { case 0x037A: // GREEK YPOGEGRAMMENI case 0x0E33: // THAI CHARACTER SARA AM @@ -3939,7 +3939,7 @@ bool OmitXidStart(int character) { } } -bool OmitXidContinue(int character) { +bool OmitXidContinue(int character) noexcept { switch (character) { case 0x037A: // GREEK YPOGEGRAMMENI case 0x309B: // KATAKANA-HIRAGANA VOICED SOUND MARK |