summaryrefslogtreecommitdiffstats
path: root/common/modelresult.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-09-02 16:00:46 -0600
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-09-02 16:00:46 -0600
commit32c507fa0565547a187632db8a80c07babb95d9d (patch)
tree01c026408fb5bb8e802b5dd66862863c741d8c40 /common/modelresult.cpp
parentf3eb97b9b4aabef41d8bc6514c74d85600e60d7f (diff)
downloadsink-32c507fa0565547a187632db8a80c07babb95d9d.tar.gz
sink-32c507fa0565547a187632db8a80c07babb95d9d.zip
Avoid hiding the index() function
Diffstat (limited to 'common/modelresult.cpp')
-rw-r--r--common/modelresult.cpp10
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();