add various nodiscard
Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
a8c77a6fba
commit
5deca66fdc
|
@ -162,7 +162,7 @@ class Iso9660InputStream final : public InputStream {
|
|||
std::array<uint8_t, ISO_BLOCKSIZE> data;
|
||||
|
||||
public:
|
||||
ConstBuffer<uint8_t> Read() const noexcept {
|
||||
[[nodiscard]] ConstBuffer<uint8_t> Read() const noexcept {
|
||||
assert(fill <= data.size());
|
||||
assert(position <= fill);
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@ public:
|
|||
}
|
||||
#endif
|
||||
|
||||
bool IsDefined() const noexcept {
|
||||
[[nodiscard]] bool IsDefined() const noexcept {
|
||||
return event.IsDefined();
|
||||
}
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ public:
|
|||
#endif
|
||||
}
|
||||
|
||||
auto &GetEventLoop() const noexcept {
|
||||
[[nodiscard]] auto &GetEventLoop() const noexcept {
|
||||
return event.GetEventLoop();
|
||||
}
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ public:
|
|||
CurlSocket(const CurlSocket &) = delete;
|
||||
CurlSocket &operator=(const CurlSocket &) = delete;
|
||||
|
||||
auto &GetEventLoop() const noexcept {
|
||||
[[nodiscard]] auto &GetEventLoop() const noexcept {
|
||||
return socket_event.GetEventLoop();
|
||||
}
|
||||
|
||||
|
@ -73,7 +73,7 @@ public:
|
|||
void *userp, void *socketp) noexcept;
|
||||
|
||||
private:
|
||||
SocketDescriptor GetSocket() const noexcept {
|
||||
[[nodiscard]] SocketDescriptor GetSocket() const noexcept {
|
||||
return socket_event.GetSocket();
|
||||
}
|
||||
|
||||
|
|
|
@ -128,13 +128,13 @@ private:
|
|||
}
|
||||
|
||||
[[gnu::pure]]
|
||||
double GetNormalizedVolume() const noexcept {
|
||||
[[nodiscard]] double GetNormalizedVolume() const noexcept {
|
||||
return get_normalized_playback_volume(elem,
|
||||
SND_MIXER_SCHN_FRONT_LEFT);
|
||||
}
|
||||
|
||||
[[gnu::pure]]
|
||||
unsigned GetPercentVolume() const noexcept {
|
||||
[[nodiscard]] unsigned GetPercentVolume() const noexcept {
|
||||
return NormalizedToPercent(GetNormalizedVolume());
|
||||
}
|
||||
|
||||
|
|
|
@ -273,7 +273,7 @@ private:
|
|||
pw_thread_loop_signal(thread_loop, false);
|
||||
}
|
||||
|
||||
std::chrono::steady_clock::duration Delay() const noexcept override;
|
||||
[[nodiscard]] std::chrono::steady_clock::duration Delay() const noexcept override;
|
||||
size_t Play(const void *chunk, size_t size) override;
|
||||
|
||||
void Drain() override;
|
||||
|
|
Loading…
Reference in New Issue