MCPcopy Create free account
hub / github.com/Icinga/icinga2 / get_sequence_4

Function get_sequence_4

third-party/utf8cpp/source/utf8/core.h:215–235  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

213
214 template <typename octet_iterator>
215 utf_error get_sequence_4(octet_iterator& it, octet_iterator end, uint32_t& code_point)
216 {
217 if (it == end)
218 return NOT_ENOUGH_ROOM;
219
220 code_point = utf8::internal::mask8(*it);
221
222 UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR(it, end)
223
224 code_point = ((code_point << 18) & 0x1fffff) + ((utf8::internal::mask8(*it) << 12) & 0x3ffff);
225
226 UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR(it, end)
227
228 code_point += (utf8::internal::mask8(*it) << 6) & 0xfff;
229
230 UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR(it, end)
231
232 code_point += (*it) & 0x3f;
233
234 return UTF8_OK;
235 }
236
237 #undef UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR
238

Callers 1

validate_nextFunction · 0.85

Calls 1

mask8Function · 0.85

Tested by

no test coverage detected