[Sketch] remove superfluous nullptr checks

This commit is contained in:
Uwe
2022-07-18 02:51:49 +02:00
parent 2d2ad11e14
commit 16c86a6d08
12 changed files with 30 additions and 30 deletions

View File

@@ -3343,7 +3343,7 @@ bool SketchObject::isExternalAllowed(App::Document *pDoc, App::DocumentObject *p
App::Part* part_this = App::Part::getPartOfObject(this);
App::Part* part_obj = App::Part::getPartOfObject(pObj);
if (part_this == part_obj){ //either in the same part, or in the root of document
if (body_this == nullptr) {
if (!body_this) {
return true;
} else if (body_this == body_obj) {
return true;
@@ -3402,7 +3402,7 @@ bool SketchObject::isCarbonCopyAllowed(App::Document *pDoc, App::DocumentObject
App::Part* part_this = App::Part::getPartOfObject(this);
App::Part* part_obj = App::Part::getPartOfObject(pObj);
if (part_this == part_obj){ //either in the same part, or in the root of document
if (body_this != nullptr) {
if (body_this) {
if (body_this != body_obj) {
if (!this->allowOtherBody) {
if (rsn)