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>
This commit is contained in:
Berthold Stoeger 2019-08-04 19:19:18 +02:00 committed by Dirk Hohndel
parent c26e922802
commit 2d637f2528

View file

@ -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;