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

Function next

third-party/utf8cpp/source/utf8/unchecked.h:84–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82
83 template <typename octet_iterator>
84 uint32_t next(octet_iterator& it)
85 {
86 uint32_t cp = utf8::internal::mask8(*it);
87 typename std::iterator_traits<octet_iterator>::difference_type length = utf8::internal::sequence_length(it);
88 switch (length) {
89 case 1:
90 break;
91 case 2:
92 it++;
93 cp = ((cp << 6) & 0x7ff) + ((*it) & 0x3f);
94 break;
95 case 3:
96 ++it;
97 cp = ((cp << 12) & 0xffff) + ((utf8::internal::mask8(*it) << 6) & 0xfff);
98 ++it;
99 cp += (*it) & 0x3f;
100 break;
101 case 4:
102 ++it;
103 cp = ((cp << 18) & 0x1fffff) + ((utf8::internal::mask8(*it) << 12) & 0x3ffff);
104 ++it;
105 cp += (utf8::internal::mask8(*it) << 6) & 0xfff;
106 ++it;
107 cp += (*it) & 0x3f;
108 break;
109 }
110 ++it;
111 return cp;
112 }
113
114 template <typename octet_iterator>
115 uint32_t peek_next(octet_iterator it)

Callers 7

peek_nextFunction · 0.70
priorFunction · 0.70
advanceFunction · 0.70
distanceFunction · 0.70
utf8to16Function · 0.70
utf8to32Function · 0.70
operator *Method · 0.70

Calls 2

mask8Function · 0.85
sequence_lengthFunction · 0.85

Tested by

no test coverage detected