mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Cleanup: use total_weight() in DiveObjectHelper::sumWeight()
Don't reimplement the summation of weights. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
3e88bd686f
commit
7bfec6fa19
1 changed files with 1 additions and 4 deletions
|
@ -352,10 +352,7 @@ int DiveObjectHelper::visibility() const
|
|||
|
||||
QString DiveObjectHelper::sumWeight() const
|
||||
{
|
||||
weight_t sum = { 0 };
|
||||
for (int i = 0; i < MAX_WEIGHTSYSTEMS; i++){
|
||||
sum.grams += m_dive->weightsystem[i].weight.grams;
|
||||
}
|
||||
weight_t sum = { total_weight(m_dive) };
|
||||
return get_weight_string(sum, true);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue