All: Reformat according to new standard

This commit is contained in:
pre-commit-ci[bot]
2025-11-11 13:49:01 +01:00
committed by Kacper Donat
parent eafd18dac0
commit 25c3ba7338
2390 changed files with 154630 additions and 115818 deletions

View File

@@ -21,8 +21,6 @@
***************************************************************************/
#include "WorkbenchFactory.h"
#include "Workbench.h"
@@ -32,27 +30,28 @@ Gui::WorkbenchFactoryInst* Gui::WorkbenchFactoryInst::_pcSingleton = nullptr;
WorkbenchFactoryInst& WorkbenchFactoryInst::instance()
{
if (!_pcSingleton)
_pcSingleton = new WorkbenchFactoryInst;
return *_pcSingleton;
if (!_pcSingleton) {
_pcSingleton = new WorkbenchFactoryInst;
}
return *_pcSingleton;
}
void WorkbenchFactoryInst::destruct ()
void WorkbenchFactoryInst::destruct()
{
delete _pcSingleton;
_pcSingleton = nullptr;
}
Workbench* WorkbenchFactoryInst::createWorkbench ( const char* sName ) const
Workbench* WorkbenchFactoryInst::createWorkbench(const char* sName) const
{
auto obj = (Workbench*)Produce( sName );
auto obj = (Workbench*)Produce(sName);
auto wb = freecad_cast<Workbench*>(obj);
if (!wb) {
delete obj; // delete the unknown object as no workbench object
delete obj; // delete the unknown object as no workbench object
return nullptr;
}
wb->setName( sName );
wb->setName(sName);
return wb;
}