From 32c507fa0565547a187632db8a80c07babb95d9d Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Sat, 2 Sep 2017 16:00:46 -0600 Subject: Avoid hiding the index() function --- common/modelresult.cpp | 10 +++++----- 1 file 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::add(const Ptr &value) auto parent = createIndexFromId(id); SinkTraceCtx(mLogCtx) << "Added entity " << childId << "id: " << value->identifier() << "parent: " << id; const auto keys = mTree[id]; - int index = 0; - for (; index < keys.size(); index++) { - if (childId < keys.at(index)) { + int idx = 0; + for (; idx < keys.size(); idx++) { + if (childId < keys.at(idx)) { break; } } // SinkTraceCtx(mLogCtx) << "Inserting rows " << index << parent; - beginInsertRows(parent, index, index); + beginInsertRows(parent, idx, idx); mEntities.insert(childId, value); - mTree[id].insert(index, childId); + mTree[id].insert(idx, childId); mParents.insert(childId, id); endInsertRows(); // SinkTraceCtx(mLogCtx) << "Inserted rows " << mTree[id].size(); -- cgit v1.2.3