summaryrefslogtreecommitdiff
path: root/src/storage
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2017-12-18 23:54:21 +0100
committerMax Kellermann <max@musicpd.org>2017-12-18 23:54:21 +0100
commit093ca5d4924aba0f95eb56a4538190346ffaa8d6 (patch)
tree3301977e063ea272b226b97e42aef5153c65b142 /src/storage
parent1d24dd30674633b289849c0763bdc4aeaca81a02 (diff)
storage/Interface: add "noexcept"
Diffstat (limited to 'src/storage')
-rw-r--r--src/storage/CompositeStorage.cxx4
-rw-r--r--src/storage/MemoryDirectoryReader.cxx2
-rw-r--r--src/storage/MemoryDirectoryReader.hxx2
-rw-r--r--src/storage/StorageInterface.hxx6
-rw-r--r--src/storage/plugins/LocalStorage.cxx4
-rw-r--r--src/storage/plugins/SmbclientStorage.cxx4
6 files changed, 11 insertions, 11 deletions
diff --git a/src/storage/CompositeStorage.cxx b/src/storage/CompositeStorage.cxx
index e55bd4ffb..f5f7e1e6b 100644
--- a/src/storage/CompositeStorage.cxx
+++ b/src/storage/CompositeStorage.cxx
@@ -53,12 +53,12 @@ public:
}
/* virtual methods from class StorageDirectoryReader */
- const char *Read() override;
+ const char *Read() noexcept override;
StorageFileInfo GetInfo(bool follow) override;
};
const char *
-CompositeDirectoryReader::Read()
+CompositeDirectoryReader::Read() noexcept
{
if (other != nullptr) {
const char *name = other->Read();
diff --git a/src/storage/MemoryDirectoryReader.cxx b/src/storage/MemoryDirectoryReader.cxx
index ae67cc9ca..a2896fa7a 100644
--- a/src/storage/MemoryDirectoryReader.cxx
+++ b/src/storage/MemoryDirectoryReader.cxx
@@ -23,7 +23,7 @@
#include <assert.h>
const char *
-MemoryStorageDirectoryReader::Read()
+MemoryStorageDirectoryReader::Read() noexcept
{
if (first)
first = false;
diff --git a/src/storage/MemoryDirectoryReader.hxx b/src/storage/MemoryDirectoryReader.hxx
index e52a4b318..fd1510c54 100644
--- a/src/storage/MemoryDirectoryReader.hxx
+++ b/src/storage/MemoryDirectoryReader.hxx
@@ -60,7 +60,7 @@ public:
:entries(std::move(_entries)), first(true) {}
/* virtual methods from class StorageDirectoryReader */
- const char *Read() override;
+ const char *Read() noexcept override;
StorageFileInfo GetInfo(bool follow) override;
};
diff --git a/src/storage/StorageInterface.hxx b/src/storage/StorageInterface.hxx
index 810b31687..74a972363 100644
--- a/src/storage/StorageInterface.hxx
+++ b/src/storage/StorageInterface.hxx
@@ -32,9 +32,9 @@ class StorageDirectoryReader {
public:
StorageDirectoryReader() = default;
StorageDirectoryReader(const StorageDirectoryReader &) = delete;
- virtual ~StorageDirectoryReader() {}
+ virtual ~StorageDirectoryReader() noexcept {}
- virtual const char *Read() = 0;
+ virtual const char *Read() noexcept = 0;
/**
* Throws #std::runtime_error on error.
@@ -46,7 +46,7 @@ class Storage {
public:
Storage() = default;
Storage(const Storage &) = delete;
- virtual ~Storage() {}
+ virtual ~Storage() noexcept {}
/**
* Throws #std::runtime_error on error.
diff --git a/src/storage/plugins/LocalStorage.cxx b/src/storage/plugins/LocalStorage.cxx
index 3f4816f80..06da3aaf7 100644
--- a/src/storage/plugins/LocalStorage.cxx
+++ b/src/storage/plugins/LocalStorage.cxx
@@ -41,7 +41,7 @@ public:
:base_fs(std::move(_base_fs)), reader(base_fs) {}
/* virtual methods from class StorageDirectoryReader */
- const char *Read() override;
+ const char *Read() noexcept override;
StorageFileInfo GetInfo(bool follow) override;
};
@@ -156,7 +156,7 @@ SkipNameFS(PathTraitsFS::const_pointer_type name_fs) noexcept
}
const char *
-LocalDirectoryReader::Read()
+LocalDirectoryReader::Read() noexcept
{
while (reader.ReadEntry()) {
const Path name_fs = reader.GetEntry();
diff --git a/src/storage/plugins/SmbclientStorage.cxx b/src/storage/plugins/SmbclientStorage.cxx
index a87cdd569..5468892d2 100644
--- a/src/storage/plugins/SmbclientStorage.cxx
+++ b/src/storage/plugins/SmbclientStorage.cxx
@@ -45,7 +45,7 @@ public:
virtual ~SmbclientDirectoryReader();
/* virtual methods from class StorageDirectoryReader */
- const char *Read() override;
+ const char *Read() noexcept override;
StorageFileInfo GetInfo(bool follow) override;
};
@@ -158,7 +158,7 @@ SmbclientDirectoryReader::~SmbclientDirectoryReader()
}
const char *
-SmbclientDirectoryReader::Read()
+SmbclientDirectoryReader::Read() noexcept
{
const std::lock_guard<Mutex> protect(smbclient_mutex);