diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2015-04-15 00:34:00 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2015-04-15 00:34:00 +0100 |
| commit | bf028388163f3c5e8fd235ccd5d81efa16d1eb22 (patch) | |
| tree | 870dbbbc0bbc669fc12117f516167ad5ea0f6116 /src/unicode.hh | |
| parent | 63bbb6e3dfdbbcd2ce52cec5b4b08795c0b5d008 (diff) | |
Remove is_blank, which is identical to is_horizontal_blank
Diffstat (limited to 'src/unicode.hh')
| -rw-r--r-- | src/unicode.hh | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/unicode.hh b/src/unicode.hh index 9485a27d..25408351 100644 --- a/src/unicode.hh +++ b/src/unicode.hh @@ -15,11 +15,6 @@ inline bool is_eol(Codepoint c) return c == '\n'; } -inline bool is_blank(Codepoint c) -{ - return c == ' ' or c == '\t'; -} - inline bool is_horizontal_blank(Codepoint c) { return c == ' ' or c == '\t'; @@ -36,12 +31,12 @@ inline bool is_word(Codepoint c) template<> inline bool is_word<WORD>(Codepoint c) { - return not is_blank(c) and not is_eol(c); + return not is_horizontal_blank(c) and not is_eol(c); } inline bool is_punctuation(Codepoint c) { - return not (is_word(c) or is_blank(c) or is_eol(c)); + return not (is_word(c) or is_horizontal_blank(c) or is_eol(c)); } enum class CharCategories @@ -59,7 +54,7 @@ inline CharCategories categorize(Codepoint c) return CharCategories::Word; if (is_eol(c)) return CharCategories::EndOfLine; - if (is_blank(c)) + if (is_horizontal_blank(c)) return CharCategories::Blank; return word_type == WORD ? CharCategories::Word : CharCategories::Punctuation; |
