[TD] remove some more superfluous nullptr checks

This commit is contained in:
Uwe
2022-07-20 02:53:48 +02:00
parent 8304a0942e
commit 31bc9f3913
31 changed files with 84 additions and 128 deletions

View File

@@ -332,7 +332,7 @@ std::vector<LineSet> DrawGeomHatch::getTrimmedLines(DrawViewPart* source,
int i = 0;
for (auto& e: resultEdges) {
TechDraw::BaseGeomPtr base = BaseGeom::baseFactory(e);
if (base == nullptr) {
if (!base) {
Base::Console().Log("FAIL - DGH::getTrimmedLines - baseFactory failed for edge: %d\n",i);
throw Base::ValueError("DGH::getTrimmedLines - baseFactory failed");
}
@@ -481,7 +481,7 @@ std::vector<LineSet> DrawGeomHatch::getFaceOverlay(int fdx)
int i = 0;
for (auto& e: candidates) {
TechDraw::BaseGeomPtr base = BaseGeom::baseFactory(e);
if (base == nullptr) {
if (!base) {
Base::Console().Log("FAIL - DGH::getFaceOverlay - baseFactory failed for edge: %d\n",i);
throw Base::ValueError("DGH::getFaceOverlay - baseFactory failed");
}