mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Filter: constify doFilter() argument
Conceptually, the doFilter() functions shouldn't modify the dive they test. Therefore, make the argument const. To do this, constify the parameter of get_dive_location(), which likewise seems to be the right thing to do. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
fb47c15cd8
commit
8a394b9db4
4 changed files with 14 additions and 12 deletions
|
|
@ -4202,9 +4202,9 @@ const char *get_dive_country(struct dive *dive)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
char *get_dive_location(struct dive *dive)
|
||||
const char *get_dive_location(const struct dive *dive)
|
||||
{
|
||||
struct dive_site *ds = get_dive_site_by_uuid(dive->dive_site_uuid);
|
||||
const struct dive_site *ds = get_dive_site_by_uuid(dive->dive_site_uuid);
|
||||
if (ds && ds->name)
|
||||
return ds->name;
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue