Minor tidy up of const auto usage

This commit is contained in:
Tristan Penman 2020-06-28 12:39:50 +10:00
parent 94cef2fa8d
commit 0481a0bb69
2 changed files with 3 additions and 3 deletions

View File

@ -283,7 +283,7 @@ public:
array.emplace(tree); // Treat as empty array
} else {
bool isArray = true;
for (const auto node : tree) {
for (const auto &node : tree) {
if (!node.first.empty()) {
isArray = false;
break;

View File

@ -232,8 +232,8 @@ public:
const typename AdapterType::Array arr = target.asArray();
bool validated = false;
for (auto itr = arr.begin(); itr != arr.end(); ++itr) {
ValidationVisitor containsValidator(*itr, context, strictTypes, nullptr);
for (const auto &el : arr) {
ValidationVisitor containsValidator(el, context, strictTypes, nullptr);
if (containsValidator.validateSchema(*subschema)) {
validated = true;
break;