more [[gnu::...]] attributes

This commit is contained in:
Max Kellermann
2021-10-13 11:28:04 +02:00
parent 1c4b484a56
commit f510564d9d
135 changed files with 361 additions and 514 deletions

View File

@@ -229,7 +229,7 @@ public:
state == DecoderState::ERROR;
}
gcc_pure
[[gnu::pure]]
bool LockIsIdle() const noexcept {
const std::lock_guard<Mutex> protect(mutex);
return IsIdle();
@@ -239,7 +239,7 @@ public:
return state == DecoderState::START;
}
gcc_pure
[[gnu::pure]]
bool LockIsStarting() const noexcept {
const std::lock_guard<Mutex> protect(mutex);
return IsStarting();
@@ -251,7 +251,7 @@ public:
return state == DecoderState::ERROR;
}
gcc_pure
[[gnu::pure]]
bool LockHasFailed() const noexcept {
const std::lock_guard<Mutex> protect(mutex);
return HasFailed();
@@ -307,15 +307,15 @@ public:
*
* Caller must lock the object.
*/
gcc_pure
[[gnu::pure]]
bool IsCurrentSong(const DetachedSong &_song) const noexcept;
gcc_pure
[[gnu::pure]]
bool IsUnseekableCurrentSong(const DetachedSong &_song) const noexcept {
return !seekable && IsCurrentSong(_song);
}
gcc_pure
[[gnu::pure]]
bool IsSeekableCurrentSong(const DetachedSong &_song) const noexcept {
return seekable && IsCurrentSong(_song);
}