From 2d637f2528ec94710d6c6f7e15568073323c74c1 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 4 Aug 2019 19:19:18 +0200 Subject: 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 --- core/subsurface-qt/DiveObjectHelper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core') 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; -- cgit v1.2.3-70-g09d2