summaryrefslogtreecommitdiff
path: root/src/storage
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2020-04-21 15:45:05 -0700
committerMax Kellermann <max@musicpd.org>2020-04-22 18:20:51 +0200
commit3c145c0f4989a83a8264f66c311d1b183a21590b (patch)
tree8763ec668ad3d5c84813ce7c643db91731aeccc8 /src/storage
parent55b8f2c533cf3567d988008f0efea74c6246d243 (diff)
[clang-tidy] add nodiscard
Found with modernize-use-nodiscard Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'src/storage')
-rw-r--r--src/storage/plugins/CurlStorage.cxx4
-rw-r--r--src/storage/plugins/LocalStorage.cxx8
-rw-r--r--src/storage/plugins/NfsStorage.cxx4
-rw-r--r--src/storage/plugins/SmbclientStorage.cxx4
4 files changed, 10 insertions, 10 deletions
diff --git a/src/storage/plugins/CurlStorage.cxx b/src/storage/plugins/CurlStorage.cxx
index 6d0bba16d..d2fc24150 100644
--- a/src/storage/plugins/CurlStorage.cxx
+++ b/src/storage/plugins/CurlStorage.cxx
@@ -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
diff --git a/src/storage/plugins/LocalStorage.cxx b/src/storage/plugins/LocalStorage.cxx
index b25a5b035..46673e3cf 100644
--- a/src/storage/plugins/LocalStorage.cxx
+++ b/src/storage/plugins/LocalStorage.cxx
@@ -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
diff --git a/src/storage/plugins/NfsStorage.cxx b/src/storage/plugins/NfsStorage.cxx
index 3b8d9f9ea..5c44591fc 100644
--- a/src/storage/plugins/NfsStorage.cxx
+++ b/src/storage/plugins/NfsStorage.cxx
@@ -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 {
diff --git a/src/storage/plugins/SmbclientStorage.cxx b/src/storage/plugins/SmbclientStorage.cxx
index 899640784..c227978c4 100644
--- a/src/storage/plugins/SmbclientStorage.cxx
+++ b/src/storage/plugins/SmbclientStorage.cxx
@@ -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