App: [skip ci] Coverity: 'Constant' variable guards dead code
This commit is contained in:
@@ -626,7 +626,7 @@ bool LinkBaseExtension::extensionGetSubObject(DocumentObject *&ret, const char *
|
||||
|
||||
if(mat) *mat *= getTransform(transform);
|
||||
|
||||
DocumentObject *element = 0;
|
||||
//DocumentObject *element = 0;
|
||||
bool isElement = false;
|
||||
int idx = getElementIndex(subname,&subname);
|
||||
if(idx>=0) {
|
||||
@@ -671,11 +671,15 @@ bool LinkBaseExtension::extensionGetSubObject(DocumentObject *&ret, const char *
|
||||
if(subname && !Data::ComplexGeoData::isMappedElement(subname) && strchr(subname,'.')) {
|
||||
if(mat)
|
||||
*mat = matNext;
|
||||
}else if(element)
|
||||
ret = element;
|
||||
}
|
||||
// This is a useless check as 'element' is never set to a value other than null
|
||||
//else if(element) {
|
||||
// ret = element;
|
||||
//}
|
||||
else if(!isElement) {
|
||||
ret = const_cast<DocumentObject*>(obj);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
if(idx) {
|
||||
postfix = Data::ComplexGeoData::indexPostfix();
|
||||
postfix += std::to_string(idx);
|
||||
|
||||
Reference in New Issue
Block a user