[TD] last part of removal of superfluous nullptr checks
This commit is contained in:
@@ -111,17 +111,14 @@ TechDraw::CosmeticVertex* CosmeticExtension::getCosmeticVertexBySelection(std::s
|
||||
CosmeticVertex* result = nullptr;
|
||||
App::DocumentObject* extObj = const_cast<App::DocumentObject*> (getExtendedObject());
|
||||
TechDraw::DrawViewPart* dvp = dynamic_cast<TechDraw::DrawViewPart*>(extObj);
|
||||
if (dvp == nullptr) {
|
||||
if (!dvp)
|
||||
return result;
|
||||
}
|
||||
int idx = DrawUtil::getIndexFromName(name);
|
||||
TechDraw::VertexPtr v = dvp->getProjVertexByIndex(idx);
|
||||
if (!v) {
|
||||
if (!v)
|
||||
return result;
|
||||
}
|
||||
if (!v->cosmeticTag.empty()) {
|
||||
if (!v->cosmeticTag.empty())
|
||||
result = getCosmeticVertex(v->cosmeticTag);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -424,9 +421,8 @@ TechDraw::GeomFormat* CosmeticExtension::getGeomFormatBySelection(std::string na
|
||||
GeomFormat* result = nullptr;
|
||||
App::DocumentObject* extObj = const_cast<App::DocumentObject*> (getExtendedObject());
|
||||
TechDraw::DrawViewPart* dvp = dynamic_cast<TechDraw::DrawViewPart*>(extObj);
|
||||
if (dvp == nullptr) {
|
||||
if (!dvp)
|
||||
return result;
|
||||
}
|
||||
int idx = DrawUtil::getIndexFromName(name);
|
||||
const std::vector<TechDraw::GeomFormat*> formats = GeomFormats.getValues();
|
||||
for (auto& gf: formats) {
|
||||
|
||||
Reference in New Issue
Block a user