Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
json
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
json
Commits
ae213721
Unverified
Commit
ae213721
authored
7 years ago
by
Niels Lohmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed unget function for wstring parsers
parent
5ff2abb9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
18 deletions
+1
-18
include/nlohmann/detail/input/input_adapters.hpp
include/nlohmann/detail/input/input_adapters.hpp
+1
-18
No files found.
include/nlohmann/detail/input/input_adapters.hpp
View file @
ae213721
...
...
@@ -123,13 +123,6 @@ class wide_string_input_adapter : public input_adapter_protocol
std
::
char_traits
<
char
>::
int_type
get_character
()
noexcept
override
{
// unget_character() was called previously: return the last character
if
(
next_unget
)
{
next_unget
=
false
;
return
last_char
;
}
// check if buffer needs to be filled
if
(
utf8_bytes_index
==
utf8_bytes_filled
)
{
...
...
@@ -149,12 +142,7 @@ class wide_string_input_adapter : public input_adapter_protocol
// use buffer
assert
(
utf8_bytes_filled
>
0
);
assert
(
utf8_bytes_index
<
utf8_bytes_filled
);
return
(
last_char
=
utf8_bytes
[
utf8_bytes_index
++
]);
}
void
unget_character
()
noexcept
override
{
next_unget
=
true
;
return
utf8_bytes
[
utf8_bytes_index
++
];
}
private:
...
...
@@ -278,11 +266,6 @@ class wide_string_input_adapter : public input_adapter_protocol
std
::
size_t
utf8_bytes_index
=
0
;
/// number of valid bytes in the utf8_codes array
std
::
size_t
utf8_bytes_filled
=
0
;
/// the last character (returned after unget_character() is called)
std
::
char_traits
<
char
>::
int_type
last_char
=
0
;
/// whether get_character() should return last_char
bool
next_unget
=
false
;
};
class
input_adapter
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment