storage/Interface: add "noexcept"
This commit is contained in:
parent
1d24dd3067
commit
093ca5d492
@ -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();
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include <assert.h>
|
||||
|
||||
const char *
|
||||
MemoryStorageDirectoryReader::Read()
|
||||
MemoryStorageDirectoryReader::Read() noexcept
|
||||
{
|
||||
if (first)
|
||||
first = false;
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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();
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user