diff --git a/src/Gui/ExpressionCompleter.cpp b/src/Gui/ExpressionCompleter.cpp index face8d1a39..26cf1b76ad 100644 --- a/src/Gui/ExpressionCompleter.cpp +++ b/src/Gui/ExpressionCompleter.cpp @@ -450,7 +450,7 @@ public: } // check to see if this is a valid path - if (idx < 0 || idx >= paths.size()) { + if (idx < 0 || idx >= static_cast(paths.size())) { return; } @@ -523,12 +523,13 @@ public: if (parentInfo.doc < 0) { // need special casing to properly identify this model's object const auto& docs = App::GetApplication().getDocuments(); + auto docsSize = static_cast(docs.size()*2); info.doc = element.row(); // if my element is a contextual descendant of root (current doc object list, current object prop list) // mark it as such - if (element.row() >= docs.size()*2) { + if (element.row() >= docsSize) { info.contextualHierarchy = 1; } } else if (parentInfo.contextualHierarchy) { @@ -537,9 +538,9 @@ public: auto cdoc = App::GetApplication().getDocument(currentDoc.c_str()); if (cdoc) { - auto objsSize = cdoc->getObjects().size()*2; + auto objsSize = static_cast(cdoc->getObjects().size()*2); int idx = parentInfo.doc - docs.size(); - if (idx < cdoc->getObjects().size()*2) { + if (idx < objsSize) { // |-- Parent (OBJECT) - (row 4, [-1,-1,-1,0]) = encode as element => [parent.row,-1,-1,1] // |- element (PROP) - (row 0, [parent.row,-1,-1,1]) = encode as element => [parent.row,-1,parent.row,1]