| 422 | } |
| 423 | |
| 424 | void 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 |
nothing calls this directly
no test coverage detected