Commit 3c145c0f authored by Rosen Penev's avatar Rosen Penev Committed by Max Kellermann

[clang-tidy] add nodiscard

Found with modernize-use-nodiscard Signed-off-by: 's avatarRosen Penev <rosenp@gmail.com>
parent 55b8f2c5
......@@ -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,
......
......@@ -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
......
......@@ -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
......
......@@ -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 {
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment