Toponaming shapeprotector Nullify() check (#12177)

* Moved the check inside the Nullify() method.

---------

Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>
This commit is contained in:
Vincenzo Calligaro
2024-01-31 17:36:30 +01:00
committed by GitHub
parent 78173fa790
commit 2ac19a9699
2 changed files with 8 additions and 4 deletions

View File

@@ -4042,9 +4042,11 @@ TopoShape &TopoShape::makeFace(const std::vector<TopoShape> &shapes, const char
return *this;
}
TopoShape &TopoShape::makeRefine(const TopoShape &shape, const char *op, bool no_fail) {
TopoShape &TopoShape::makeRefine(const TopoShape &shape, const char *op, bool no_fail)
{
(void)op;
_Shape.Nullify();
if(shape.isNull()) {
if(!no_fail)
HANDLE_NULL_SHAPE;

View File

@@ -1072,9 +1072,11 @@ private:
void Nullify()
{
_owner->resetElementMap();
_owner->_cache.reset();
_owner->_parentCache.reset();
if (!this->IsNull()) {
_owner->resetElementMap();
_owner->_cache.reset();
_owner->_parentCache.reset();
}
}
const TopLoc_Location& Location() const