Commit d143dd9c authored by EXT Arnaud Clère's avatar EXT Arnaud Clère
Browse files

Fixed QBind<TResult, QJsonArray> (traversal locus was lost)

parent 0b53d628
......@@ -425,7 +425,7 @@ struct QBind<TResult, const QJsonArray> { static TResult bind(Val<TResult> dst,
static_assert(TResult::Mode==Write,"Cannot Read from TResult into const QJsonArray&");
auto s(dst.sequence());
for (auto&& item : src) {
s.bind(item);
s = s.bind(item);
}
return s;
}};
......@@ -434,14 +434,14 @@ struct QBind<TResult, QJsonArray> {
static TResult bind(Val<TResult> dst, QJsonArray& src, std::enable_if_t<TResult::Mode==Write>* = nullptr) {
auto s(dst.sequence());
for (auto item : src) {
s.bind(item);
s = s.bind(item);
}
return s;
}
static TResult bind(Val<TResult> src, QJsonArray& dst, std::enable_if_t<TResult::Mode==Read >* = nullptr) {
auto s(src.sequence());
QJsonValue v;
while (s.bind(v)) {
while (s = s.bind(v)) {
dst.push_back(v);
}
return s;
......
Supports Markdown
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