mirror of
https://github.com/pocoproject/poco.git
synced 2026-01-09 23:49:58 +01:00
Usage modern C++ features on JSON modules (enhanced) (#4613)
This commit is contained in:
@@ -37,9 +37,7 @@ Query::Query(const Var& source): _source(source)
|
||||
}
|
||||
|
||||
|
||||
Query::~Query()
|
||||
{
|
||||
}
|
||||
Query::~Query() = default;
|
||||
|
||||
|
||||
Object::Ptr Query::findObject(const std::string& path) const
|
||||
@@ -51,7 +49,7 @@ Object::Ptr Query::findObject(const std::string& path) const
|
||||
else if (result.type() == typeid(Object))
|
||||
return new Object(result.extract<Object>());
|
||||
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -79,7 +77,7 @@ Array::Ptr Query::findArray(const std::string& path) const
|
||||
else if (result.type() == typeid(Array))
|
||||
return new Array(result.extract<Array>());
|
||||
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -150,7 +148,7 @@ Var Query::find(const std::string& path) const
|
||||
|
||||
if (!result.isEmpty() && !indexes.empty())
|
||||
{
|
||||
for (auto i: indexes)
|
||||
for (const auto& i: indexes)
|
||||
{
|
||||
if (result.type() == typeid(Array::Ptr))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user