mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2024-12-13 10:22:55 +01:00
Reduce scope of variable.
This commit is contained in:
parent
a7d0ffc717
commit
091e03979d
@ -706,8 +706,8 @@ bool Reader::decodeUnicodeCodePoint(Token& token,
|
||||
return addError(
|
||||
"additional six characters expected to parse unicode surrogate pair.",
|
||||
token, current);
|
||||
unsigned int surrogatePair;
|
||||
if (*(current++) == '\\' && *(current++) == 'u') {
|
||||
unsigned int surrogatePair;
|
||||
if (decodeUnicodeEscapeSequence(token, current, end, surrogatePair)) {
|
||||
unicode = 0x10000 + ((unicode & 0x3FF) << 10) + (surrogatePair & 0x3FF);
|
||||
} else
|
||||
@ -1726,8 +1726,8 @@ bool OurReader::decodeUnicodeCodePoint(Token& token,
|
||||
return addError(
|
||||
"additional six characters expected to parse unicode surrogate pair.",
|
||||
token, current);
|
||||
unsigned int surrogatePair;
|
||||
if (*(current++) == '\\' && *(current++) == 'u') {
|
||||
unsigned int surrogatePair;
|
||||
if (decodeUnicodeEscapeSequence(token, current, end, surrogatePair)) {
|
||||
unicode = 0x10000 + ((unicode & 0x3FF) << 10) + (surrogatePair & 0x3FF);
|
||||
} else
|
||||
|
Loading…
Reference in New Issue
Block a user