diff --git a/lib/univalue.cpp b/lib/univalue.cpp index 00c90a3..c4e59fa 100644 --- a/lib/univalue.cpp +++ b/lib/univalue.cpp @@ -178,17 +178,19 @@ bool UniValue::findKey(const std::string& key, size_t& retIdx) const bool UniValue::checkObject(const std::map& t) const { - if (typ != VOBJ) + if (typ != VOBJ) { return false; + } - for (std::map::const_iterator it = t.begin(); - it != t.end(); ++it) { + for (const auto& object: t) { size_t idx = 0; - if (!findKey(it->first, idx)) + if (!findKey(object.first, idx)) { return false; + } - if (values.at(idx).getType() != it->second) + if (values.at(idx).getType() != object.second) { return false; + } } return true;