From 2b67a141551e9dd8e4b83e4bacd95e2cbc2b54b5 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 21 Jan 2018 11:30:09 +0100 Subject: [PATCH] SongPrint: add "noexcept" --- src/SongPrint.cxx | 12 ++++++------ src/SongPrint.hxx | 10 ++++++---- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/SongPrint.cxx b/src/SongPrint.cxx index a7e816822..c7c670bdd 100644 --- a/src/SongPrint.cxx +++ b/src/SongPrint.cxx @@ -34,7 +34,7 @@ #define SONG_FILE "file: " 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; @@ -50,7 +50,7 @@ song_print_uri(Response &r, const char *uri, bool base) } 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) 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) } 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); } 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 end_ms = end_time.ToMS(); @@ -83,7 +83,7 @@ PrintRange(Response &r, SongTime start_time, SongTime end_time) } 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); @@ -96,7 +96,7 @@ song_print_info(Response &r, const LightSong &song, bool base) } 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); diff --git a/src/SongPrint.hxx b/src/SongPrint.hxx index 585a04dc4..31f9df0d9 100644 --- a/src/SongPrint.hxx +++ b/src/SongPrint.hxx @@ -25,15 +25,17 @@ class DetachedSong; class Response; 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 -song_print_info(Response &r, const LightSong &song, bool base=false); +song_print_info(Response &r, const LightSong &song, bool base=false) noexcept; 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 -song_print_uri(Response &r, const DetachedSong &song, bool base=false); +song_print_uri(Response &r, const DetachedSong &song, + bool base=false) noexcept; #endif -- 2.11.4.GIT