PVS: V688 The local variable possesses the same name as one of the class members, which can result in a confusion

This commit is contained in:
wmayer
2020-07-17 17:56:13 +02:00
parent 811efa6107
commit af9c5274b4
2 changed files with 7 additions and 7 deletions

View File

@@ -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));

View File

@@ -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) {