mirror of
https://github.com/nlohmann/json.git
synced 2024-12-19 09:37:51 +08:00
Generate header
This commit is contained in:
parent
0231059290
commit
ad3c216bb5
@ -2004,14 +2004,7 @@ class wide_string_input_adapter : public input_adapter_protocol
|
|||||||
// check if buffer needs to be filled
|
// check if buffer needs to be filled
|
||||||
if (utf8_bytes_index == utf8_bytes_filled)
|
if (utf8_bytes_index == utf8_bytes_filled)
|
||||||
{
|
{
|
||||||
if (sizeof(typename WideStringType::value_type) == 2)
|
fill_buffer(sizeof(typename WideStringType::value_type));
|
||||||
{
|
|
||||||
fill_buffer_utf16();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
fill_buffer_utf32();
|
|
||||||
}
|
|
||||||
|
|
||||||
assert(utf8_bytes_filled > 0);
|
assert(utf8_bytes_filled > 0);
|
||||||
assert(utf8_bytes_index == 0);
|
assert(utf8_bytes_index == 0);
|
||||||
@ -2024,6 +2017,18 @@ class wide_string_input_adapter : public input_adapter_protocol
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void fill_buffer(size_t size)
|
||||||
|
{
|
||||||
|
if (2 == size)
|
||||||
|
{
|
||||||
|
fill_buffer_utf16();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fill_buffer_utf32();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void fill_buffer_utf16()
|
void fill_buffer_utf16()
|
||||||
{
|
{
|
||||||
utf8_bytes_index = 0;
|
utf8_bytes_index = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user