mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-23 00:07:59 +02:00
fixed JSON testsuite errors and warnings with VS2012
This commit is contained in:
@@ -101,11 +101,11 @@ Var Query::find(const std::string& path) const
|
|||||||
{
|
{
|
||||||
if ( firstOffset == -1 )
|
if ( firstOffset == -1 )
|
||||||
{
|
{
|
||||||
firstOffset = matches[0].offset;
|
firstOffset = static_cast<int>(matches[0].offset);
|
||||||
}
|
}
|
||||||
std::string num = token->substr(matches[1].offset, matches[1].length);
|
std::string num = token->substr(matches[1].offset, matches[1].length);
|
||||||
indexes.push_back(NumberParser::parse(num));
|
indexes.push_back(NumberParser::parse(num));
|
||||||
offset = matches[0].offset + matches[0].length;
|
offset = static_cast<int>(matches[0].offset + matches[0].length);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string name(*token);
|
std::string name(*token);
|
||||||
|
@@ -214,7 +214,7 @@ void JSONTest::testStringProperty()
|
|||||||
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.isString());
|
assert(test.isString());
|
||||||
std::string value = test;
|
std::string value = test.convert<std::string>();
|
||||||
assert(value.compare("value") == 0);
|
assert(value.compare("value") == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -360,7 +360,7 @@ void JSONTest::testObjectProperty()
|
|||||||
|
|
||||||
test = object->get("property");
|
test = object->get("property");
|
||||||
assert(test.isString());
|
assert(test.isString());
|
||||||
std::string value = test;
|
std::string value = test.convert<std::string>();
|
||||||
assert(value.compare("value") == 0);
|
assert(value.compare("value") == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -556,7 +556,7 @@ void JSONTest::testStringElement()
|
|||||||
Array::Ptr array = result.extract<Array::Ptr>();
|
Array::Ptr array = result.extract<Array::Ptr>();
|
||||||
Var test = array->get(0);
|
Var test = array->get(0);
|
||||||
assert(test.isString());
|
assert(test.isString());
|
||||||
std::string value = test;
|
std::string value = test.convert<std::string>();
|
||||||
assert(value.compare("value") == 0);
|
assert(value.compare("value") == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user