diff options
author | Max Kellermann <max@musicpd.org> | 2017-05-08 14:44:49 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2017-05-08 14:44:49 +0200 |
commit | 71f0ed8b7499011b53f90998ebfbd3250fd80948 (patch) | |
tree | e9c2f66fbef231858f46d878864199d46e6ce21c /src/DetachedSong.cxx | |
parent | ac2e4e593d407e41db49fdb9ae2da6bc1557f618 (diff) |
*: add "noexcept" to many, many function prototypes
This eliminates some overhead, because the compiler doesn't need to
consider these functions throwing.
Diffstat (limited to 'src/DetachedSong.cxx')
-rw-r--r-- | src/DetachedSong.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/DetachedSong.cxx b/src/DetachedSong.cxx index 8bef0f6ff..e4a292814 100644 --- a/src/DetachedSong.cxx +++ b/src/DetachedSong.cxx @@ -37,19 +37,19 @@ DetachedSong::~DetachedSong() } bool -DetachedSong::IsRemote() const +DetachedSong::IsRemote() const noexcept { return uri_has_scheme(GetRealURI()); } bool -DetachedSong::IsAbsoluteFile() const +DetachedSong::IsAbsoluteFile() const noexcept { return PathTraitsUTF8::IsAbsolute(GetRealURI()); } bool -DetachedSong::IsInDatabase() const +DetachedSong::IsInDatabase() const noexcept { /* here, we use GetURI() and not GetRealURI() because GetRealURI() is never relative */ @@ -59,7 +59,7 @@ DetachedSong::IsInDatabase() const } SignedSongTime -DetachedSong::GetDuration() const +DetachedSong::GetDuration() const noexcept { SongTime a = start_time, b = end_time; if (!b.IsPositive()) { |