aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-08-04 19:19:18 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-11-09 19:19:04 +0100
commit2d637f2528ec94710d6c6f7e15568073323c74c1 (patch)
treef298cffaa8fe15e96ae1c8484ad9a2e6971ac965
parentc26e922802826dc9e2f044312cc33d5a037f6a10 (diff)
downloadsubsurface-2d637f2528ec94710d6c6f7e15568073323c74c1.tar.gz
Cleanup: replace unsigned by signed parameter in two helper functions
In getFormattedWeight() and getFormattedCylinder(), the indexes were passed as unsigned ints. This makes no sense as the only callers were using signed ints. Change the parameters to signed. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
-rw-r--r--core/subsurface-qt/DiveObjectHelper.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/subsurface-qt/DiveObjectHelper.cpp b/core/subsurface-qt/DiveObjectHelper.cpp
index 1deffdd4e..ed3d8bfb2 100644
--- a/core/subsurface-qt/DiveObjectHelper.cpp
+++ b/core/subsurface-qt/DiveObjectHelper.cpp
@@ -20,7 +20,7 @@ static int callCounter = 0;
enum returnPressureSelector {START_PRESSURE, END_PRESSURE};
-static QString getFormattedWeight(const struct dive *dive, unsigned int idx)
+static QString getFormattedWeight(const struct dive *dive, int idx)
{
const weightsystem_t *weight = &dive->weightsystems.weightsystems[idx];
if (!weight->description)
@@ -30,7 +30,7 @@ static QString getFormattedWeight(const struct dive *dive, unsigned int idx)
return fmt;
}
-static QString getFormattedCylinder(const struct dive *dive, unsigned int idx)
+static QString getFormattedCylinder(const struct dive *dive, int idx)
{
const cylinder_t *cyl = &dive->cylinders.cylinders[idx];
const char *desc = cyl->type.description;