Commit 2b67a141 authored by Max Kellermann's avatar Max Kellermann

SongPrint: add "noexcept"

parent eac8caa4
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#define SONG_FILE "file: " #define SONG_FILE "file: "
static void static void
song_print_uri(Response &r, const char *uri, bool base) song_print_uri(Response &r, const char *uri, bool base) noexcept
{ {
std::string allocated; std::string allocated;
...@@ -50,7 +50,7 @@ song_print_uri(Response &r, const char *uri, bool base) ...@@ -50,7 +50,7 @@ song_print_uri(Response &r, const char *uri, bool base)
} }
void void
song_print_uri(Response &r, const LightSong &song, bool base) song_print_uri(Response &r, const LightSong &song, bool base) noexcept
{ {
if (!base && song.directory != nullptr) if (!base && song.directory != nullptr)
r.Format(SONG_FILE "%s/%s\n", song.directory, song.uri); r.Format(SONG_FILE "%s/%s\n", song.directory, song.uri);
...@@ -59,13 +59,13 @@ song_print_uri(Response &r, const LightSong &song, bool base) ...@@ -59,13 +59,13 @@ song_print_uri(Response &r, const LightSong &song, bool base)
} }
void void
song_print_uri(Response &r, const DetachedSong &song, bool base) song_print_uri(Response &r, const DetachedSong &song, bool base) noexcept
{ {
song_print_uri(r, song.GetURI(), base); song_print_uri(r, song.GetURI(), base);
} }
static void static void
PrintRange(Response &r, SongTime start_time, SongTime end_time) PrintRange(Response &r, SongTime start_time, SongTime end_time) noexcept
{ {
const unsigned start_ms = start_time.ToMS(); const unsigned start_ms = start_time.ToMS();
const unsigned end_ms = end_time.ToMS(); const unsigned end_ms = end_time.ToMS();
...@@ -83,7 +83,7 @@ PrintRange(Response &r, SongTime start_time, SongTime end_time) ...@@ -83,7 +83,7 @@ PrintRange(Response &r, SongTime start_time, SongTime end_time)
} }
void void
song_print_info(Response &r, const LightSong &song, bool base) song_print_info(Response &r, const LightSong &song, bool base) noexcept
{ {
song_print_uri(r, song, base); song_print_uri(r, song, base);
...@@ -96,7 +96,7 @@ song_print_info(Response &r, const LightSong &song, bool base) ...@@ -96,7 +96,7 @@ song_print_info(Response &r, const LightSong &song, bool base)
} }
void void
song_print_info(Response &r, const DetachedSong &song, bool base) song_print_info(Response &r, const DetachedSong &song, bool base) noexcept
{ {
song_print_uri(r, song, base); song_print_uri(r, song, base);
......
...@@ -25,15 +25,17 @@ class DetachedSong; ...@@ -25,15 +25,17 @@ class DetachedSong;
class Response; class Response;
void void
song_print_info(Response &r, const DetachedSong &song, bool base=false); song_print_info(Response &r, const DetachedSong &song,
bool base=false) noexcept;
void void
song_print_info(Response &r, const LightSong &song, bool base=false); song_print_info(Response &r, const LightSong &song, bool base=false) noexcept;
void void
song_print_uri(Response &r, const LightSong &song, bool base=false); song_print_uri(Response &r, const LightSong &song, bool base=false) noexcept;
void void
song_print_uri(Response &r, const DetachedSong &song, bool base=false); song_print_uri(Response &r, const DetachedSong &song,
bool base=false) noexcept;
#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