[partition] Simplify selectedDevice()

This commit is contained in:
Adriaan de Groot 2024-07-02 20:45:26 +02:00
parent bf466e0ea4
commit 6ded13a917

View File

@ -360,10 +360,7 @@ ChoicePage::setupChoices()
Device* Device*
ChoicePage::selectedDevice() ChoicePage::selectedDevice()
{ {
Device* currentDevice = nullptr; Device* const currentDevice = m_core->deviceModel()->deviceForIndex( m_core->deviceModel()->index( m_drivesCombo->currentIndex() ) );
currentDevice
= m_core->deviceModel()->deviceForIndex( m_core->deviceModel()->index( m_drivesCombo->currentIndex() ) );
return currentDevice; return currentDevice;
} }