mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Cleanup: make table argument to get_dive_from_table() const
Even though the returned dive is not const, the table is not changed, as it only contains pointers. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
a1a2492438
commit
a353bcb296
2 changed files with 2 additions and 2 deletions
|
@ -3872,7 +3872,7 @@ struct dive *get_dive(int nr)
|
|||
return dive_table.dives[nr];
|
||||
}
|
||||
|
||||
struct dive *get_dive_from_table(int nr, struct dive_table *dt)
|
||||
struct dive *get_dive_from_table(int nr, const struct dive_table *dt)
|
||||
{
|
||||
if (nr >= dt->nr || nr < 0)
|
||||
return NULL;
|
||||
|
|
|
@ -255,7 +255,7 @@ extern struct dive *current_dive;
|
|||
#define displayed_dc (get_dive_dc(&displayed_dive, dc_number))
|
||||
|
||||
extern struct dive *get_dive(int nr);
|
||||
extern struct dive *get_dive_from_table(int nr, struct dive_table *dt);
|
||||
extern struct dive *get_dive_from_table(int nr, const struct dive_table *dt);
|
||||
extern struct dive_site *get_dive_site_for_dive(const struct dive *dive);
|
||||
extern const char *get_dive_country(const struct dive *dive);
|
||||
extern const char *get_dive_location(const struct dive *dive);
|
||||
|
|
Loading…
Reference in a new issue