From af9c5274b497db3351346285e239ea68cd831f8b Mon Sep 17 00:00:00 2001 From: wmayer Date: Fri, 17 Jul 2020 17:56:13 +0200 Subject: [PATCH] PVS: V688 The local variable possesses the same name as one of the class members, which can result in a confusion --- src/App/PropertyLinks.cpp | 6 +++--- src/Gui/Tree.cpp | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/App/PropertyLinks.cpp b/src/App/PropertyLinks.cpp index c5036cffd9..609252390d 100644 --- a/src/App/PropertyLinks.cpp +++ b/src/App/PropertyLinks.cpp @@ -3218,9 +3218,9 @@ void PropertyXLink::Restore(Base::XMLReader &reader) { // read my element reader.readElement("XLink"); - std::string stamp,file; + std::string stampAttr,file; if(reader.hasAttribute("stamp")) - stamp = reader.getAttribute("stamp"); + stampAttr = reader.getAttribute("stamp"); if(reader.hasAttribute("file")) file = reader.getAttribute("file"); setFlag(LinkAllowPartial, @@ -3293,7 +3293,7 @@ void PropertyXLink::Restore(Base::XMLReader &reader) } if(file.size() || (!object && name.size())) { - this->stamp = stamp; + this->stamp = stampAttr; setValue(std::move(file),std::move(name),std::move(subs),std::move(shadows)); }else setValue(object,std::move(subs),std::move(shadows)); diff --git a/src/Gui/Tree.cpp b/src/Gui/Tree.cpp index f8a6c9bb01..e5023d2ffb 100644 --- a/src/Gui/Tree.cpp +++ b/src/Gui/Tree.cpp @@ -2436,14 +2436,14 @@ void TreeWidget::onUpdateStatus(void) this->blockConnection(false); } - auto currentDocItem = getDocumentItem(Application::Instance->activeDocument()); + auto activeDocItem = getDocumentItem(Application::Instance->activeDocument()); QTreeWidgetItem *errItem = 0; for(auto obj : errors) { DocumentObjectDataPtr data; - if(currentDocItem) { - auto it = currentDocItem->ObjectMap.find(obj); - if(it!=currentDocItem->ObjectMap.end()) + if(activeDocItem) { + auto it = activeDocItem->ObjectMap.find(obj); + if(it!=activeDocItem->ObjectMap.end()) data = it->second; } if(!data) {