Commit 4911bf48 authored by Alexander Lapshin's avatar Alexander Lapshin

.

parent 595709ff
......@@ -260,15 +260,15 @@ void loadjson(const jsonval& parent, std::vector<T>& vec)
if (parent.IsArray()) {
for (rapidjson::SizeType i = 0; i < parent.Size(); i++) {
T item;
loadjson(parent[i], item);
vec.push_back(item);
item.load(parent[i]);
vec.emplace_back(item);
}
}
else if (parent.IsObject()) {
for (jsonval::ConstMemberIterator itr = parent.MemberBegin(); itr != parent.MemberEnd(); ++itr) {
T item;
loadjson(itr->value, item);
vec.push_back(item);
item.load(itr->value);
vec.emplace_back(item);
}
}
else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment