diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-09-02 16:00:46 -0600 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-09-02 16:00:46 -0600 |
commit | 32c507fa0565547a187632db8a80c07babb95d9d (patch) | |
tree | 01c026408fb5bb8e802b5dd66862863c741d8c40 | |
parent | f3eb97b9b4aabef41d8bc6514c74d85600e60d7f (diff) | |
download | sink-32c507fa0565547a187632db8a80c07babb95d9d.tar.gz sink-32c507fa0565547a187632db8a80c07babb95d9d.zip |
Avoid hiding the index() function
-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(); |