OLD | NEW |
| (Empty) |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include <cstdint> | |
6 | |
7 namespace blink { | |
8 | |
9 using CharacterPropertyType = uint8_t; | |
10 | |
11 enum class CharacterProperty : CharacterPropertyType { | |
12 isCJKIdeographOrSymbol = 0x0001, | |
13 isUprightInMixedVertical = 0x0002, | |
14 }; | |
15 | |
16 inline CharacterProperty operator | ( | |
17 CharacterProperty a, CharacterProperty b) | |
18 { | |
19 return static_cast<CharacterProperty>( | |
20 static_cast<CharacterPropertyType>(a) | |
21 | static_cast<CharacterPropertyType>(b)); | |
22 } | |
23 | |
24 inline CharacterProperty operator & ( | |
25 CharacterProperty a, CharacterProperty b) | |
26 { | |
27 return static_cast<CharacterProperty>( | |
28 static_cast<CharacterPropertyType>(a) | |
29 & static_cast<CharacterPropertyType>(b)); | |
30 } | |
31 | |
32 inline CharacterProperty operator |= ( | |
33 CharacterProperty& a, CharacterProperty b) | |
34 { | |
35 a = a | b; | |
36 return a; | |
37 } | |
38 | |
39 } // namespace blink | |
OLD | NEW |