| 150 | } |
| 151 | |
| 152 | inline char Utf8Adjust(unsigned long ch, unsigned char lead_bits, |
| 153 | unsigned char rshift) { |
| 154 | const unsigned char header = |
| 155 | static_cast<unsigned char>(((1 << lead_bits) - 1) << (8 - lead_bits)); |
| 156 | const unsigned char mask = (0xFF >> (lead_bits + 1)); |
| 157 | return static_cast<char>( |
| 158 | static_cast<unsigned char>(header | ((ch >> rshift) & mask))); |
| 159 | } |
| 160 | |
| 161 | inline void QueueUnicodeCodepoint(std::deque<char>& q, unsigned long ch) { |
| 162 | // We are not allowed to queue the Stream::eof() codepoint, so |
no outgoing calls
no test coverage detected