mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Cleanup: uninline get_dive_site_by_uuid
There seems to be no compelling reason to have this function inlined. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
f6957c54af
commit
0893f87beb
2 changed files with 11 additions and 10 deletions
|
@ -10,6 +10,16 @@
|
|||
|
||||
struct dive_site_table dive_site_table;
|
||||
|
||||
struct dive_site *get_dive_site_by_uuid(uint32_t uuid)
|
||||
{
|
||||
int i;
|
||||
struct dive_site *ds;
|
||||
for_each_dive_site (i, ds)
|
||||
if (ds->uuid == uuid)
|
||||
return get_dive_site(i);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* there could be multiple sites of the same name - return the first one */
|
||||
struct dive_site *get_dive_site_by_name(const char *name)
|
||||
{
|
||||
|
|
|
@ -42,16 +42,7 @@ static inline struct dive_site *get_dive_site(int nr)
|
|||
#define for_each_dive_site(_i, _x) \
|
||||
for ((_i) = 0; ((_x) = get_dive_site(_i)) != NULL; (_i)++)
|
||||
|
||||
static inline struct dive_site *get_dive_site_by_uuid(uint32_t uuid)
|
||||
{
|
||||
int i;
|
||||
struct dive_site *ds;
|
||||
for_each_dive_site (i, ds)
|
||||
if (ds->uuid == uuid)
|
||||
return get_dive_site(i);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
struct dive_site *get_dive_site_by_uuid(uint32_t uuid);
|
||||
void dive_site_table_sort();
|
||||
struct dive_site *alloc_or_get_dive_site(uint32_t uuid);
|
||||
int nr_of_dives_at_dive_site(struct dive_site *ds, bool select_only);
|
||||
|
|
Loading…
Add table
Reference in a new issue