diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/modelresult.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/common/modelresult.cpp b/common/modelresult.cpp index 58703ab..95f4643 100644 --- a/common/modelresult.cpp +++ b/common/modelresult.cpp | |||
@@ -298,16 +298,16 @@ void ModelResult<T, Ptr>::add(const Ptr &value) | |||
298 | auto parent = createIndexFromId(id); | 298 | auto parent = createIndexFromId(id); |
299 | SinkTraceCtx(mLogCtx) << "Added entity " << childId << "id: " << value->identifier() << "parent: " << id; | 299 | SinkTraceCtx(mLogCtx) << "Added entity " << childId << "id: " << value->identifier() << "parent: " << id; |
300 | const auto keys = mTree[id]; | 300 | const auto keys = mTree[id]; |
301 | int index = 0; | 301 | int idx = 0; |
302 | for (; index < keys.size(); index++) { | 302 | for (; idx < keys.size(); idx++) { |
303 | if (childId < keys.at(index)) { | 303 | if (childId < keys.at(idx)) { |
304 | break; | 304 | break; |
305 | } | 305 | } |
306 | } | 306 | } |
307 | // SinkTraceCtx(mLogCtx) << "Inserting rows " << index << parent; | 307 | // SinkTraceCtx(mLogCtx) << "Inserting rows " << index << parent; |
308 | beginInsertRows(parent, index, index); | 308 | beginInsertRows(parent, idx, idx); |
309 | mEntities.insert(childId, value); | 309 | mEntities.insert(childId, value); |
310 | mTree[id].insert(index, childId); | 310 | mTree[id].insert(idx, childId); |
311 | mParents.insert(childId, id); | 311 | mParents.insert(childId, id); |
312 | endInsertRows(); | 312 | endInsertRows(); |
313 | // SinkTraceCtx(mLogCtx) << "Inserted rows " << mTree[id].size(); | 313 | // SinkTraceCtx(mLogCtx) << "Inserted rows " << mTree[id].size(); |