playlist/Song: add "noexcept"

This commit is contained in:
Max Kellermann 2018-01-21 11:28:18 +01:00
parent 9b13d862c1
commit 45748a2bb0
2 changed files with 4 additions and 4 deletions

View File

@ -29,7 +29,7 @@
#include <string.h> #include <string.h>
static void static void
merge_song_metadata(DetachedSong &add, const DetachedSong &base) merge_song_metadata(DetachedSong &add, const DetachedSong &base) noexcept
{ {
if (base.GetTag().IsDefined()) { if (base.GetTag().IsDefined()) {
TagBuilder builder(add.GetTag()); TagBuilder builder(add.GetTag());
@ -41,7 +41,7 @@ merge_song_metadata(DetachedSong &add, const DetachedSong &base)
} }
static bool static bool
playlist_check_load_song(DetachedSong &song, const SongLoader &loader) playlist_check_load_song(DetachedSong &song, const SongLoader &loader) noexcept
try { try {
DetachedSong tmp = loader.LoadSong(song.GetURI()); DetachedSong tmp = loader.LoadSong(song.GetURI());
@ -57,7 +57,7 @@ try {
bool bool
playlist_check_translate_song(DetachedSong &song, const char *base_uri, playlist_check_translate_song(DetachedSong &song, const char *base_uri,
const SongLoader &loader) const SongLoader &loader) noexcept
{ {
if (base_uri != nullptr && strcmp(base_uri, ".") == 0) if (base_uri != nullptr && strcmp(base_uri, ".") == 0)
/* PathTraitsUTF8::GetParent() returns "." when there /* PathTraitsUTF8::GetParent() returns "." when there

View File

@ -31,6 +31,6 @@ class DetachedSong;
*/ */
bool bool
playlist_check_translate_song(DetachedSong &song, const char *base_uri, playlist_check_translate_song(DetachedSong &song, const char *base_uri,
const SongLoader &loader); const SongLoader &loader) noexcept;
#endif #endif