mirror of
https://github.com/pocoproject/poco.git
synced 2025-04-02 09:49:48 +02:00
indentation
This commit is contained in:
parent
6943505634
commit
66a56a944f
JSON
@ -583,8 +583,8 @@ bool Parser::readRow(bool firstCall)
|
|||||||
|
|
||||||
token = nextToken();
|
token = nextToken();
|
||||||
|
|
||||||
if ( token->is(Token::SEPARATOR_TOKEN)
|
if (token->is(Token::SEPARATOR_TOKEN)
|
||||||
&& token->asChar() == ':')
|
&& token->asChar() == ':')
|
||||||
{
|
{
|
||||||
readValue(nextToken());
|
readValue(nextToken());
|
||||||
|
|
||||||
@ -638,8 +638,8 @@ void Parser::readValue(const Token* token)
|
|||||||
#if defined(POCO_HAVE_INT64)
|
#if defined(POCO_HAVE_INT64)
|
||||||
Int64 value = token->asInteger64();
|
Int64 value = token->asInteger64();
|
||||||
// if number is 32-bit, then handle as such
|
// if number is 32-bit, then handle as such
|
||||||
if ( value > std::numeric_limits<int>::max()
|
if (value > std::numeric_limits<int>::max()
|
||||||
|| value < std::numeric_limits<int>::min())
|
|| value < std::numeric_limits<int>::min())
|
||||||
{
|
{
|
||||||
_handler->value(value);
|
_handler->value(value);
|
||||||
}
|
}
|
||||||
|
@ -122,8 +122,8 @@ Var Query::find(const std::string& path) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !result.isEmpty()
|
if (!result.isEmpty()
|
||||||
&& !indexes.empty() )
|
&& !indexes.empty() )
|
||||||
{
|
{
|
||||||
for(std::vector<int>::iterator it = indexes.begin(); it != indexes.end(); ++it )
|
for(std::vector<int>::iterator it = indexes.begin(); it != indexes.end(); ++it )
|
||||||
{
|
{
|
||||||
|
@ -200,7 +200,7 @@ void JSONTest::testNumber64Property()
|
|||||||
std::string json = "{ \"test\" : 5000000000000000 }";
|
std::string json = "{ \"test\" : 5000000000000000 }";
|
||||||
Parser parser;
|
Parser parser;
|
||||||
Var result;
|
Var result;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
DefaultHandler handler;
|
DefaultHandler handler;
|
||||||
@ -213,13 +213,13 @@ void JSONTest::testNumber64Property()
|
|||||||
std::cout << jsone.message() << std::endl;
|
std::cout << jsone.message() << std::endl;
|
||||||
assert(false);
|
assert(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(result.type() == typeid(Object::Ptr));
|
assert(result.type() == typeid(Object::Ptr));
|
||||||
|
|
||||||
Object::Ptr object = result.extract<Object::Ptr>();
|
Object::Ptr object = result.extract<Object::Ptr>();
|
||||||
Var test = object->get("test");
|
Var test = object->get("test");
|
||||||
assert(test.isInteger());
|
assert(test.isInteger());
|
||||||
Poco::Int64 value = test;
|
Poco::Int64 value = test;
|
||||||
assert(value == 5000000000000000);
|
assert(value == 5000000000000000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user