forked from qt-creator/qt-creator
Lua: Cleanup code style
Change-Id: I7d8713c87a097f113c5b9d04104f3948b691dbf9 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
@@ -162,17 +162,13 @@ sol::table LuaEngine::toTable(const sol::state_view &lua, const QJsonValue &v)
|
||||
|
||||
if (v.isObject()) {
|
||||
QJsonObject o = v.toObject();
|
||||
|
||||
for (auto it = o.constBegin(); it != o.constEnd(); ++it) {
|
||||
setFromJson(table, it.key().toStdString(), it.value());
|
||||
}
|
||||
|
||||
for (auto it = o.constBegin(); it != o.constEnd(); ++it)
|
||||
setFromJson(table, it.key(), it.value());
|
||||
} else if (v.isArray()) {
|
||||
int i = 1;
|
||||
for (const auto &v : v.toArray()) {
|
||||
for (const auto &v : v.toArray())
|
||||
setFromJson(table, i++, v);
|
||||
}
|
||||
}
|
||||
|
||||
return table;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user