[TD] remove some more superfluous nullptr checks

This commit is contained in:
Uwe
2022-07-20 02:53:48 +02:00
parent 7b4e5d7522
commit 5486c9808d
31 changed files with 84 additions and 128 deletions

View File

@@ -67,19 +67,15 @@ void QGIViewSection::draw()
void QGIViewSection::drawSectionFace()
{
auto section( dynamic_cast<TechDraw::DrawViewSection *>(getViewObject()) );
if( section == nullptr ) {
if (!section)
return;
}
if ( !section->hasGeometry()) {
if (!section->hasGeometry())
return;
}
Gui::ViewProvider* gvp = QGIView::getViewProvider(section);
ViewProviderViewSection* sectionVp = dynamic_cast<ViewProviderViewSection*>(gvp);
if ((sectionVp == nullptr) ||
(!sectionVp->ShowCutSurface.getValue())) {
if (!sectionVp || !sectionVp->ShowCutSurface.getValue())
return;
}
float lineWidth = sectionVp->LineWidth.getValue();
@@ -152,9 +148,8 @@ void QGIViewSection::updateView(bool update)
{
Q_UNUSED(update);
auto viewPart( dynamic_cast<TechDraw::DrawViewSection *>(getViewObject()) );
if( viewPart == nullptr ) {
if (!viewPart)
return;
}
draw();
QGIView::updateView(update);
}