fix -Wextra in FreeCADApp
This commit is contained in:
@@ -2317,11 +2317,12 @@ DocumentObject * Document::getObject(const char *Name) const
|
||||
}
|
||||
|
||||
// Note: This method is only used in Tree.cpp slotChangeObject(), see explanation there
|
||||
const bool Document::isIn(const DocumentObject *pFeat) const
|
||||
bool Document::isIn(const DocumentObject *pFeat) const
|
||||
{
|
||||
for (std::map<std::string,DocumentObject*>::const_iterator o = d->objectMap.begin(); o != d->objectMap.end(); o++)
|
||||
for (std::map<std::string,DocumentObject*>::const_iterator o = d->objectMap.begin(); o != d->objectMap.end(); ++o) {
|
||||
if (o->second == pFeat)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -2330,9 +2331,10 @@ const char * Document::getObjectName(DocumentObject *pFeat) const
|
||||
{
|
||||
std::map<std::string,DocumentObject*>::const_iterator pos;
|
||||
|
||||
for (pos = d->objectMap.begin();pos != d->objectMap.end();++pos)
|
||||
for (pos = d->objectMap.begin();pos != d->objectMap.end();++pos) {
|
||||
if (pos->second == pFeat)
|
||||
return pos->first.c_str();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user