Commit 81e89837 authored by Max Kellermann's avatar Max Kellermann

Song: move trivial inline functions up

parent 3c0dea81
...@@ -88,6 +88,18 @@ song_replace_uri(struct song *song, const char *uri); ...@@ -88,6 +88,18 @@ song_replace_uri(struct song *song, const char *uri);
void void
song_free(struct song *song); song_free(struct song *song);
static inline bool
song_in_database(const struct song *song)
{
return song->parent != NULL;
}
static inline bool
song_is_file(const struct song *song)
{
return song_in_database(song) || song->uri[0] == '/';
}
bool bool
song_file_update(struct song *song); song_file_update(struct song *song);
...@@ -107,18 +119,6 @@ song_get_uri(const struct song *song); ...@@ -107,18 +119,6 @@ song_get_uri(const struct song *song);
double double
song_get_duration(const struct song *song); song_get_duration(const struct song *song);
static inline bool
song_in_database(const struct song *song)
{
return song->parent != NULL;
}
static inline bool
song_is_file(const struct song *song)
{
return song_in_database(song) || song->uri[0] == '/';
}
G_END_DECLS G_END_DECLS
#endif #endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment