fix -Wextra in FreeCADApp

This commit is contained in:
wmayer
2016-09-21 16:05:36 +02:00
parent 39e589a4d7
commit c636974ec8
14 changed files with 115 additions and 32 deletions

View File

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