mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Cleanup: Remove superfluous QString constructions in divetripmodel.cpp
Remove superfluous QString constructions in a couple of simple functions in divetripmodel.cpp Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
This commit is contained in:
parent
aacc688670
commit
93ddcce6fa
1 changed files with 4 additions and 8 deletions
|
@ -369,19 +369,17 @@ QString DiveItem::displayDuration() const
|
|||
|
||||
QString DiveItem::displayTemperature() const
|
||||
{
|
||||
QString str;
|
||||
struct dive *dive = get_dive_by_uniq_id(diveId);
|
||||
if (!dive->watertemp.mkelvin)
|
||||
return str;
|
||||
return QString();
|
||||
return get_temperature_string(dive->watertemp, false);
|
||||
}
|
||||
|
||||
QString DiveItem::displayTemperatureWithUnit() const
|
||||
{
|
||||
QString str;
|
||||
struct dive *dive = get_dive_by_uniq_id(diveId);
|
||||
if (!dive->watertemp.mkelvin)
|
||||
return str;
|
||||
return QString();
|
||||
return get_temperature_string(dive->watertemp, true);
|
||||
}
|
||||
|
||||
|
@ -403,14 +401,12 @@ QString DiveItem::displaySacWithUnit() const
|
|||
|
||||
QString DiveItem::displayWeight() const
|
||||
{
|
||||
QString str = weight_string(weight());
|
||||
return str;
|
||||
return weight_string(weight());
|
||||
}
|
||||
|
||||
QString DiveItem::displayWeightWithUnit() const
|
||||
{
|
||||
QString str = weight_string(weight()) + ((get_units()->weight == units::KG) ? tr("kg") : tr("lbs"));
|
||||
return str;
|
||||
return weight_string(weight()) + ((get_units()->weight == units::KG) ? tr("kg") : tr("lbs"));
|
||||
}
|
||||
|
||||
int DiveItem::weight() const
|
||||
|
|
Loading…
Reference in a new issue