Unused code: remove weightsystems_equal()

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This commit is contained in:
Jan Mulder 2017-05-20 08:46:26 +02:00
parent b2c7a4cf1d
commit dc54b4aaeb
2 changed files with 0 additions and 15 deletions

View file

@ -984,7 +984,6 @@ extern bool cylinder_nodata(const cylinder_t *cyl);
extern bool cylinder_none(void *_data);
extern bool weightsystem_none(void *_data);
extern bool no_weightsystems(weightsystem_t *ws);
extern bool weightsystems_equal(weightsystem_t *ws1, weightsystem_t *ws2);
extern void remove_cylinder(struct dive *dive, int idx);
extern void remove_weightsystem(struct dive *dive, int idx);
extern void reset_cylinders(struct dive *dive, bool track_gas);

View file

@ -115,20 +115,6 @@ bool no_weightsystems(weightsystem_t *ws)
return true;
}
static bool one_weightsystem_equal(weightsystem_t *ws1, weightsystem_t *ws2)
{
return ws1->weight.grams == ws2->weight.grams &&
same_string(ws1->description, ws2->description);
}
bool weightsystems_equal(weightsystem_t *ws1, weightsystem_t *ws2)
{
for (int i = 0; i < MAX_WEIGHTSYSTEMS; i++)
if (!one_weightsystem_equal(ws1 + i, ws2 + i))
return false;
return true;
}
/*
* We hardcode the most common standard cylinders,
* we should pick up any other names from the dive