Gui: Use freecad_cast whenever possible

This commit is contained in:
Kacper Donat
2025-04-25 00:07:31 +02:00
committed by Benjamin Nauck
parent d586447a7d
commit 6e2583cdcd
13 changed files with 38 additions and 38 deletions

View File

@@ -46,7 +46,7 @@ void WorkbenchFactoryInst::destruct ()
Workbench* WorkbenchFactoryInst::createWorkbench ( const char* sName ) const
{
auto obj = (Workbench*)Produce( sName );
auto wb = dynamic_cast<Workbench*>(obj);
auto wb = freecad_cast<Workbench*>(obj);
if (!wb) {
delete obj; // delete the unknown object as no workbench object
return nullptr;