MCPcopy Create free account
hub / github.com/Open-GD/OpenGD / get_character

Method get_character

Source/external/json.hpp:6187–6196  ·  view source on GitHub ↗

std::istream/std::streambuf use std::char_traits ::to_int_type, to ensure that std::char_traits ::eof() and the character 0xFF do not end up as the same value, e.g. 0xFFFFFFFF.

Source from the content-addressed store, hash-verified

6185 // ensure that std::char_traits<char>::eof() and the character 0xFF do not
6186 // end up as the same value, e.g. 0xFFFFFFFF.
6187 std::char_traits<char>::int_type get_character()
6188 {
6189 auto res = sb->sbumpc();
6190 // set eof manually, as we don't use the istream interface.
6191 if (JSON_HEDLEY_UNLIKELY(res == std::char_traits<char>::eof()))
6192 {
6193 is->clear(is->rdstate() | std::ios::eofbit);
6194 }
6195 return res;
6196 }
6197
6198 private:
6199 /// the associated input stream

Callers 4

fill_bufferMethod · 0.45
fill_bufferMethod · 0.45
getFunction · 0.45
getMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected