MCPcopy Create free account
hub / github.com/apache/trafficserver / StreamInUtf32

Method StreamInUtf32

lib/yamlcpp/src/stream.cpp:424–445  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

422}
423
424void Stream::StreamInUtf32() const {
425 static int indexes[2][4] = {{3, 2, 1, 0}, {0, 1, 2, 3}};
426
427 unsigned long ch = 0;
428 unsigned char bytes[4];
429 int* pIndexes = (m_charSet == utf32be) ? indexes[1] : indexes[0];
430
431 bytes[0] = GetNextByte();
432 bytes[1] = GetNextByte();
433 bytes[2] = GetNextByte();
434 bytes[3] = GetNextByte();
435 if (!m_input.good()) {
436 return;
437 }
438
439 for (int i = 0; i < 4; ++i) {
440 ch <<= 8;
441 ch |= bytes[pIndexes[i]];
442 }
443
444 QueueUnicodeCodepoint(m_readahead, ch);
445}
446} // namespace YAML

Callers

nothing calls this directly

Calls 2

QueueUnicodeCodepointFunction · 0.85
goodMethod · 0.45

Tested by

no test coverage detected