Skip to content

Commit e60c38b

Browse files
committed
More bit tweaks
1 parent 1a6e750 commit e60c38b

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

lib/inc/sys_string/impl/unicode/algorithms.h

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ namespace sysstr
132132
static constexpr uint16_t s_lf_offset = 7;
133133
static constexpr uint16_t s_cr_offset = 8;
134134
static constexpr uint16_t s_zwj_offset = 9;
135-
static constexpr uint16_t s_special_mask = 0b0000'0011'1000'0000;
135+
static constexpr uint16_t s_special_mask = 0b0000'0001'1100'0000;
136136

137137
enum class special : uint16_t
138138
{
@@ -152,7 +152,7 @@ namespace sysstr
152152
};
153153

154154
static constexpr uint16_t s_state_offset = 10;
155-
static constexpr uint16_t s_state_mask = 0b0001'1100'0000'0000;
155+
static constexpr uint16_t s_state_mask = 0b000'1110'0000'0000;
156156

157157
static constexpr special get_special(char32_t c)
158158
{
@@ -164,10 +164,7 @@ namespace sysstr
164164
}
165165

166166
static constexpr uint16_t pack(table::value props, special sp, state st)
167-
{
168-
return props | uint16_t(sp) | (uint16_t(st) << s_state_offset);
169-
}
170-
167+
{ return props | uint16_t(sp) | (uint16_t(st) << s_state_offset); }
171168
static constexpr table::value basic_props(table::value props)
172169
{ return table::value(props & table::basic_mask); }
173170
static constexpr table::value in_cb_props(table::value props)
@@ -283,7 +280,7 @@ namespace sysstr
283280

284281
if (current_basic_props == table::extend || current_special == special::zwj || //GB9
285282
current_basic_props == table::spacing_mark || //GB9a
286-
prev_basic_props == table::prepend) //GB9b
283+
prev_basic_props == table::prepend) //GB9b
287284
break;
288285

289286

0 commit comments

Comments
 (0)