Fix non-void function that returned without a return value

QTC_ASSERT(false, action) would print "false" and then take that action
(the return). The other branch of the QTC_ASSERT was a constant false,
so it would never be taken. However, ICC didn't seem happy with it, so I
moved the return to after the checking.

Change-Id: Ia50e75c91fb345e6b21cd5f91df3070544b42d22
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
Thiago Macieira
2012-05-20 21:10:44 +02:00
committed by hjk
parent ca8cd6b806
commit 2d08cb93fc

View File

@@ -92,7 +92,8 @@ LinuxDeviceConfiguration::ConstPtr TypeSpecificDeviceConfigurationListModel::dev
if (target()->supportsDevice(device) && ++currentRow == idx) if (target()->supportsDevice(device) && ++currentRow == idx)
return device.staticCast<const LinuxDeviceConfiguration>(); return device.staticCast<const LinuxDeviceConfiguration>();
} }
QTC_ASSERT(false, return LinuxDeviceConfiguration::ConstPtr()); QTC_CHECK(false);
return LinuxDeviceConfiguration::ConstPtr();
} }
LinuxDeviceConfiguration::ConstPtr TypeSpecificDeviceConfigurationListModel::defaultDeviceConfig() const LinuxDeviceConfiguration::ConstPtr TypeSpecificDeviceConfigurationListModel::defaultDeviceConfig() const