diff --git a/src/ifcgeom/taxonomy.cpp b/src/ifcgeom/taxonomy.cpp index 7d509db8cb..2ce115dfd1 100644 --- a/src/ifcgeom/taxonomy.cpp +++ b/src/ifcgeom/taxonomy.cpp @@ -543,8 +543,8 @@ piecewise_function::const_ptr offset_function::get_offset() const { return offse ifcopenshell::geometry::taxonomy::collection::ptr ifcopenshell::geometry::flatten(const taxonomy::collection::ptr& deep) { auto flat = make(); ifcopenshell::geometry::visit(deep, [&flat](taxonomy::ptr i) { - flat->children.push_back(taxonomy::cast(clone(i))); - }); + flat->children.push_back(std::static_pointer_cast(clone(i))); + }); return flat; } diff --git a/src/ifcgeom/taxonomy.h b/src/ifcgeom/taxonomy.h index ab8a222aee..5d70d4490c 100644 --- a/src/ifcgeom/taxonomy.h +++ b/src/ifcgeom/taxonomy.h @@ -1622,25 +1622,19 @@ typedef item const* ptr; for (auto& i : deep->children) { // @todo Sad... now that we have templated collection members, // we can't generally use collection_base anymore as a cast target. - if (auto s = taxonomy::dcast(i)) { + if (auto s = std::dynamic_pointer_cast(i)) { visit(s, fn); - } - else if (auto s = taxonomy::dcast(i)) { + } else if (auto s = std::dynamic_pointer_cast(i)) { visit(s, fn); - } - else if (auto s = taxonomy::dcast(i)) { + } else if (auto s = std::dynamic_pointer_cast(i)) { visit(s, fn); - } - else if (auto s = taxonomy::dcast(i)) { + } else if (auto s = std::dynamic_pointer_cast(i)) { visit(s, fn); - } - else if (auto s = taxonomy::dcast(i)) { + } else if (auto s = std::dynamic_pointer_cast(i)) { visit(s, fn); - } - else if (auto s = taxonomy::dcast(i)) { + } else if (auto s = std::dynamic_pointer_cast(i)) { visit(s, fn); - } - else if (auto s = taxonomy::dcast(i)) { + } else if (auto s = std::dynamic_pointer_cast(i)) { visit(s, fn); } else {