Merge pull request #19142 from hyarion/refactor/add-template-addobject

Add new addObject<T>() function
This commit is contained in:
Chris Hennes
2025-02-11 09:42:47 -06:00
committed by GitHub
95 changed files with 335 additions and 340 deletions

View File

@@ -327,8 +327,7 @@ void CrossSections::apply()
App::Document* doc = it->getDocument();
std::string s = it->getNameInDocument();
s += "_cs";
Part::Feature* section =
static_cast<Part::Feature*>(doc->addObject("Part::Feature", s.c_str()));
Part::Feature* section = doc->addObject<Part::Feature>(s.c_str());
section->Shape.setValue(comp);
section->purgeTouched();
}