Mod: Use new addObject<T>(...) using regex
This commit is contained in:
@@ -22,11 +22,11 @@ protected:
|
||||
fileInfo.setFile(Base::FileInfo::getTempFileName() + ".stl");
|
||||
|
||||
const double value = 10.0;
|
||||
cube1 = dynamic_cast<Mesh::Cube*>(document->addObject("Mesh::Cube", "Cube1"));
|
||||
cube1 = document->addObject<Mesh::Cube>("Cube1");
|
||||
cube1->Length.setValue(value);
|
||||
cube1->Width.setValue(value);
|
||||
cube1->Height.setValue(value);
|
||||
cube2 = dynamic_cast<Mesh::Cube*>(document->addObject("Mesh::Cube", "Cube2"));
|
||||
cube2 = document->addObject<Mesh::Cube>("Cube2");
|
||||
cube2->Length.setValue(value);
|
||||
cube2->Width.setValue(value);
|
||||
cube2->Height.setValue(value);
|
||||
@@ -130,7 +130,7 @@ TEST_F(ExporterTest, TestMeshesInPart)
|
||||
|
||||
// add extra scope because the file will be written when destroying the exporter
|
||||
{
|
||||
auto part = dynamic_cast<App::Part*>(getDocument()->addObject("App::Part", "Part"));
|
||||
auto part = getDocument()->addObject<App::Part>("Part");
|
||||
part->placement().setValue(plm);
|
||||
part->addObjects(getObjects());
|
||||
Mesh::MergeExporter exporter(getFileName(), MeshCore::MeshIO::Format::STL);
|
||||
|
||||
Reference in New Issue
Block a user