Part/Toponaming: clang-tidy cleanup of cache calls
This commit is contained in:
committed by
Chris Hennes
parent
58e53c1b22
commit
2dc5e8de5b
@@ -79,14 +79,14 @@ public:
|
||||
/// Inverse of location
|
||||
TopLoc_Location locationInverse;
|
||||
|
||||
struct AncestorInfo
|
||||
struct PartExport AncestorInfo
|
||||
{
|
||||
bool initialized = false;
|
||||
TopTools_IndexedDataMapOfShapeListOfShape shapes;
|
||||
};
|
||||
|
||||
/// Class for caching the ancestor and children shapes mapping
|
||||
class Ancestry
|
||||
class PartExport Ancestry
|
||||
{
|
||||
private:
|
||||
TopoShapeCache* owner = nullptr;
|
||||
|
||||
@@ -138,22 +138,21 @@ int TopoShape::findShape(const TopoDS_Shape& subshape) const
|
||||
return _cache->findShape(_Shape, subshape);
|
||||
}
|
||||
|
||||
static const std::string _SubShape("SubShape");
|
||||
|
||||
TopoDS_Shape TopoShape::findShape(const char* name) const
|
||||
{
|
||||
if (!name) {
|
||||
return TopoDS_Shape();
|
||||
return {};
|
||||
}
|
||||
|
||||
Data::MappedElement res = getElementName(name);
|
||||
if (!res.index) {
|
||||
return TopoDS_Shape();
|
||||
return {};
|
||||
}
|
||||
|
||||
auto idx = shapeTypeAndIndex(name);
|
||||
if (!idx.second) {
|
||||
return TopoDS_Shape();
|
||||
if (idx.second == 0) {
|
||||
return {};
|
||||
}
|
||||
initCache();
|
||||
return _cache->findShape(_Shape, idx.first, idx.second);
|
||||
|
||||
Reference in New Issue
Block a user