aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/utility.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/utility.h b/src/utility.h
index 75811f5..56bcfea 100644
--- a/src/utility.h
+++ b/src/utility.h
@@ -7,17 +7,17 @@ namespace UTF8 {
namespace dtl {
enum class CodeUnitType : std::uint8_t {
- CONTINUATION = (128 >> 0), // 10000000
- LEADING = (128 >> 1), // 01000000
- THREE = (128 >> 2), // 00100000
- FOUR = (128 >> 3), // 00010000
+ CONTINUATION = 0b10000000,
+ LEADING = 0b01000000,
+ THREE = 0b00100000,
+ FOUR = 0b00010000
};
enum class CodePoint : std::uint8_t {
- CONTINUATION = (UINT8_MAX >> 2), // 00111111
- TWO = (UINT8_MAX >> 3), // 00011111
- THREE = (UINT8_MAX >> 4), // 00001111
- FOUR = (UINT8_MAX >> 5), // 00000111
+ CONTINUATION = 0b00111111,
+ TWO = 0b00011111,
+ THREE = 0b00001111,
+ FOUR = 0b00000111
};
inline bool match(const std::uint8_t unit, const CodeUnitType type) {