media: create sort_picture_table function via macro

This needs a slight change to the macro, because here we sort by
value type. Yes, from a C-programming point of view this is horrible,
however a decent compiler should just inline everything and not
pass around value types.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2020-04-14 20:06:19 +02:00 committed by Dirk Hohndel
parent db24f16686
commit ebdb3e3c30
3 changed files with 4 additions and 3 deletions

View file

@ -35,6 +35,7 @@ extern void copy_pictures(const struct picture_table *s, struct picture_table *d
extern void add_picture(struct picture_table *, struct picture newpic);
extern bool remove_picture(struct picture_table *, const char *filename);
extern int get_picture_idx(const struct picture_table *, const char *filename); /* Return -1 if not found */
extern void sort_picture_table(struct picture_table *);
#ifdef __cplusplus
}