MCPcopy Create free account
hub / github.com/bytedance/bolt / consumeCodePoint

Method consumeCodePoint

bolt/type/Tokenizer.cpp:278–291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

276}
277
278void DefaultTokenizer::consumeCodePoint() {
279 if (index_ >= path_.size())
280 return;
281 const unsigned char* p =
282 reinterpret_cast<const unsigned char*>(path_.data() + index_);
283 const unsigned char* e =
284 reinterpret_cast<const unsigned char*>(path_.data() + path_.size());
285 const unsigned char* orig = p;
286 folly::utf8ToCodePoint(p, e, /*skipOnError=*/false);
287 if (p == orig) {
288 invalidSubfieldPath();
289 }
290 index_ += (p - orig);
291}
292
293void DefaultTokenizer::consumeCurrentCodePoint() {
294 if (index_ >= path_.size()) {

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected