diff --git a/matrix/room_power.cc b/matrix/room_power.cc index c40a29ab9..a871165b7 100644 --- a/matrix/room_power.cc +++ b/matrix/room_power.cc @@ -407,8 +407,8 @@ const view([&ret] (const json::object &content) { - for(const auto &member : content) - ret += json::type(member.second) == json::OBJECT; + for(const auto &[key, val] : content) + ret += json::type(val) == json::OBJECT; }); return ret; @@ -572,18 +572,18 @@ const for(auto it(begin(collection)); it != end(collection) && ret; ++it) { - const auto &member(*it); - if(json::type(unquote(member.second)) != json::NUMBER) + const auto &[key_, val_] {*it}; + if(json::type(unquote(val_)) != json::NUMBER) continue; const json::string &key { - member.first + key_ }; const auto &val { - lex_cast(member.second) + lex_cast(val_) }; ret = closure(key, val);