mirror of
https://github.com/tristanpenman/valijson.git
synced 2025-01-06 00:31:11 +01:00
Minor tidy up of const auto usage
This commit is contained in:
parent
94cef2fa8d
commit
0481a0bb69
@ -283,7 +283,7 @@ public:
|
|||||||
array.emplace(tree); // Treat as empty array
|
array.emplace(tree); // Treat as empty array
|
||||||
} else {
|
} else {
|
||||||
bool isArray = true;
|
bool isArray = true;
|
||||||
for (const auto node : tree) {
|
for (const auto &node : tree) {
|
||||||
if (!node.first.empty()) {
|
if (!node.first.empty()) {
|
||||||
isArray = false;
|
isArray = false;
|
||||||
break;
|
break;
|
||||||
|
@ -232,8 +232,8 @@ public:
|
|||||||
const typename AdapterType::Array arr = target.asArray();
|
const typename AdapterType::Array arr = target.asArray();
|
||||||
|
|
||||||
bool validated = false;
|
bool validated = false;
|
||||||
for (auto itr = arr.begin(); itr != arr.end(); ++itr) {
|
for (const auto &el : arr) {
|
||||||
ValidationVisitor containsValidator(*itr, context, strictTypes, nullptr);
|
ValidationVisitor containsValidator(el, context, strictTypes, nullptr);
|
||||||
if (containsValidator.validateSchema(*subschema)) {
|
if (containsValidator.validateSchema(*subschema)) {
|
||||||
validated = true;
|
validated = true;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user