mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-06-29 09:06:03 +02:00
parent
b999616df8
commit
ea4af18317
@ -430,25 +430,25 @@ void Reader::readNumber() {
|
|||||||
char c = '0'; // stopgap for already consumed character
|
char c = '0'; // stopgap for already consumed character
|
||||||
// integral part
|
// integral part
|
||||||
while (c >= '0' && c <= '9')
|
while (c >= '0' && c <= '9')
|
||||||
c = (current_ = p) < end_ ? *p++ : 0;
|
c = (current_ = p) < end_ ? *p++ : '\0';
|
||||||
// fractional part
|
// fractional part
|
||||||
if (c == '.') {
|
if (c == '.') {
|
||||||
c = (current_ = p) < end_ ? *p++ : 0;
|
c = (current_ = p) < end_ ? *p++ : '\0';
|
||||||
while (c >= '0' && c <= '9')
|
while (c >= '0' && c <= '9')
|
||||||
c = (current_ = p) < end_ ? *p++ : 0;
|
c = (current_ = p) < end_ ? *p++ : '\0';
|
||||||
}
|
}
|
||||||
// exponential part
|
// exponential part
|
||||||
if (c == 'e' || c == 'E') {
|
if (c == 'e' || c == 'E') {
|
||||||
c = (current_ = p) < end_ ? *p++ : 0;
|
c = (current_ = p) < end_ ? *p++ : '\0';
|
||||||
if (c == '+' || c == '-')
|
if (c == '+' || c == '-')
|
||||||
c = (current_ = p) < end_ ? *p++ : 0;
|
c = (current_ = p) < end_ ? *p++ : '\0';
|
||||||
while (c >= '0' && c <= '9')
|
while (c >= '0' && c <= '9')
|
||||||
c = (current_ = p) < end_ ? *p++ : 0;
|
c = (current_ = p) < end_ ? *p++ : '\0';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Reader::readString() {
|
bool Reader::readString() {
|
||||||
Char c = 0;
|
Char c = '\0';
|
||||||
while (current_ != end_) {
|
while (current_ != end_) {
|
||||||
c = getNextChar();
|
c = getNextChar();
|
||||||
if (c == '\\')
|
if (c == '\\')
|
||||||
@ -1394,20 +1394,20 @@ bool OurReader::readNumber(bool checkInf) {
|
|||||||
char c = '0'; // stopgap for already consumed character
|
char c = '0'; // stopgap for already consumed character
|
||||||
// integral part
|
// integral part
|
||||||
while (c >= '0' && c <= '9')
|
while (c >= '0' && c <= '9')
|
||||||
c = (current_ = p) < end_ ? *p++ : 0;
|
c = (current_ = p) < end_ ? *p++ : '\0';
|
||||||
// fractional part
|
// fractional part
|
||||||
if (c == '.') {
|
if (c == '.') {
|
||||||
c = (current_ = p) < end_ ? *p++ : 0;
|
c = (current_ = p) < end_ ? *p++ : '\0';
|
||||||
while (c >= '0' && c <= '9')
|
while (c >= '0' && c <= '9')
|
||||||
c = (current_ = p) < end_ ? *p++ : 0;
|
c = (current_ = p) < end_ ? *p++ : '\0';
|
||||||
}
|
}
|
||||||
// exponential part
|
// exponential part
|
||||||
if (c == 'e' || c == 'E') {
|
if (c == 'e' || c == 'E') {
|
||||||
c = (current_ = p) < end_ ? *p++ : 0;
|
c = (current_ = p) < end_ ? *p++ : '\0';
|
||||||
if (c == '+' || c == '-')
|
if (c == '+' || c == '-')
|
||||||
c = (current_ = p) < end_ ? *p++ : 0;
|
c = (current_ = p) < end_ ? *p++ : '\0';
|
||||||
while (c >= '0' && c <= '9')
|
while (c >= '0' && c <= '9')
|
||||||
c = (current_ = p) < end_ ? *p++ : 0;
|
c = (current_ = p) < end_ ? *p++ : '\0';
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user