[clang-tidy] add nodiscard

Found with modernize-use-nodiscard

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2020-04-21 15:45:05 -07:00 committed by Max Kellermann
parent 55b8f2c533
commit 3c145c0f49
5 changed files with 11 additions and 11 deletions

View File

@ -88,7 +88,7 @@ public:
void Open() override;
void Close() noexcept override;
const LightSong *GetSong(std::string_view uri_utf8) const override;
[[nodiscard]] const LightSong *GetSong(std::string_view uri_utf8) const override;
void ReturnSong(const LightSong *song) const noexcept override;
void Visit(const DatabaseSelection &selection,

View File

@ -61,9 +61,9 @@ public:
std::unique_ptr<StorageDirectoryReader> OpenDirectory(std::string_view uri_utf8) override;
std::string MapUTF8(std::string_view uri_utf8) const noexcept override;
[[nodiscard]] std::string MapUTF8(std::string_view uri_utf8) const noexcept override;
std::string_view MapToRelativeUTF8(std::string_view uri_utf8) const noexcept override;
[[nodiscard]] std::string_view MapToRelativeUTF8(std::string_view uri_utf8) const noexcept override;
};
std::string

View File

@ -60,14 +60,14 @@ public:
std::unique_ptr<StorageDirectoryReader> OpenDirectory(std::string_view uri_utf8) override;
std::string MapUTF8(std::string_view uri_utf8) const noexcept override;
[[nodiscard]] std::string MapUTF8(std::string_view uri_utf8) const noexcept override;
AllocatedPath MapFS(std::string_view uri_utf8) const noexcept override;
[[nodiscard]] AllocatedPath MapFS(std::string_view uri_utf8) const noexcept override;
std::string_view MapToRelativeUTF8(std::string_view uri_utf8) const noexcept override;
[[nodiscard]] std::string_view MapToRelativeUTF8(std::string_view uri_utf8) const noexcept override;
private:
AllocatedPath MapFSOrThrow(std::string_view uri_utf8) const;
[[nodiscard]] AllocatedPath MapFSOrThrow(std::string_view uri_utf8) const;
};
static StorageFileInfo

View File

@ -90,9 +90,9 @@ public:
std::unique_ptr<StorageDirectoryReader> OpenDirectory(std::string_view uri_utf8) override;
std::string MapUTF8(std::string_view uri_utf8) const noexcept override;
[[nodiscard]] std::string MapUTF8(std::string_view uri_utf8) const noexcept override;
std::string_view MapToRelativeUTF8(std::string_view uri_utf8) const noexcept override;
[[nodiscard]] std::string_view MapToRelativeUTF8(std::string_view uri_utf8) const noexcept override;
/* virtual methods from NfsLease */
void OnNfsConnectionReady() noexcept final {

View File

@ -68,9 +68,9 @@ public:
std::unique_ptr<StorageDirectoryReader> OpenDirectory(std::string_view uri_utf8) override;
std::string MapUTF8(std::string_view uri_utf8) const noexcept override;
[[nodiscard]] std::string MapUTF8(std::string_view uri_utf8) const noexcept override;
std::string_view MapToRelativeUTF8(std::string_view uri_utf8) const noexcept override;
[[nodiscard]] std::string_view MapToRelativeUTF8(std::string_view uri_utf8) const noexcept override;
};
std::string