Save one iteration in parse_number
This commit is contained in:
@@ -461,6 +461,8 @@ private:
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
callbacks->on_begin_number(data);
|
callbacks->on_begin_number(data);
|
||||||
|
++buf;
|
||||||
|
--len;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
if ('0' <= *buf && *buf <= '9') {
|
if ('0' <= *buf && *buf <= '9') {
|
||||||
++buf;
|
++buf;
|
||||||
@@ -839,6 +841,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
const std::string json = R"({
|
const std::string json = R"({
|
||||||
|
"a number": 12345,
|
||||||
"glossary": {
|
"glossary": {
|
||||||
"title": "example glossary",
|
"title": "example glossary",
|
||||||
"GlossDiv": {
|
"GlossDiv": {
|
||||||
|
|||||||
Reference in New Issue
Block a user