Gui: Use auto and range-based for (#7481)
* On lines where the variable type is obvious from inspection, avoid repeating the type using auto. * When possible use a ranged for loop instead of begin() and end() iterators
This commit is contained in:
@@ -46,8 +46,8 @@ void WorkbenchFactoryInst::destruct ()
|
||||
|
||||
Workbench* WorkbenchFactoryInst::createWorkbench ( const char* sName ) const
|
||||
{
|
||||
Workbench* obj = (Workbench*)Produce( sName );
|
||||
Workbench* w = dynamic_cast<Workbench*>(obj);
|
||||
auto obj = (Workbench*)Produce( sName );
|
||||
auto w = dynamic_cast<Workbench*>(obj);
|
||||
if ( !w )
|
||||
{
|
||||
delete obj; // delete the unknown object as no workbench object
|
||||
|
||||
Reference in New Issue
Block a user