Gui: improve whitespaces
This commit is contained in:
@@ -39,30 +39,28 @@ WorkbenchFactoryInst& WorkbenchFactoryInst::instance()
|
||||
|
||||
void WorkbenchFactoryInst::destruct ()
|
||||
{
|
||||
if (_pcSingleton)
|
||||
delete _pcSingleton;
|
||||
_pcSingleton = nullptr;
|
||||
_pcSingleton = nullptr;
|
||||
}
|
||||
|
||||
Workbench* WorkbenchFactoryInst::createWorkbench ( const char* sName ) const
|
||||
{
|
||||
auto obj = (Workbench*)Produce( sName );
|
||||
auto w = dynamic_cast<Workbench*>(obj);
|
||||
if ( !w )
|
||||
{
|
||||
delete obj; // delete the unknown object as no workbench object
|
||||
return nullptr;
|
||||
}
|
||||
auto wb = dynamic_cast<Workbench*>(obj);
|
||||
if (!wb) {
|
||||
delete obj; // delete the unknown object as no workbench object
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
w->setName( sName );
|
||||
return w;
|
||||
wb->setName( sName );
|
||||
return wb;
|
||||
}
|
||||
|
||||
std::list<std::string> WorkbenchFactoryInst::workbenches() const
|
||||
{
|
||||
std::list<std::string> wb;
|
||||
for (std::map<const std::string, Base::AbstractProducer*>::const_iterator
|
||||
it = _mpcProducers.begin(); it != _mpcProducers.end(); ++it)
|
||||
wb.push_back(it->first);
|
||||
return wb;
|
||||
std::list<std::string> wb;
|
||||
for (const auto& it : _mpcProducers) {
|
||||
wb.push_back(it.first);
|
||||
}
|
||||
return wb;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user