[clang-tidy] use nodiscard

Introduced in C++17. It replaces gcc's warn_unused_result.

Found with modernize-use-nodiscard.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2020-03-11 23:43:06 -07:00
parent 2229e86673
commit f00f8b002a
37 changed files with 58 additions and 58 deletions

View File

@@ -291,7 +291,7 @@ struct WavpackInput {
int32_t ReadBytes(void *data, size_t bcount);
InputStream::offset_type GetPos() const {
[[nodiscard]] InputStream::offset_type GetPos() const {
return is.GetOffset();
}
@@ -337,14 +337,14 @@ struct WavpackInput {
}
}
InputStream::offset_type GetLength() const {
[[nodiscard]] InputStream::offset_type GetLength() const {
if (!is.KnownSize())
return 0;
return is.GetSize();
}
bool CanSeek() const {
[[nodiscard]] bool CanSeek() const {
return is.IsSeekable();
}
};