storage/Interface: add "noexcept"
This commit is contained in:
parent
1d24dd3067
commit
093ca5d492
@ -53,12 +53,12 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* virtual methods from class StorageDirectoryReader */
|
/* virtual methods from class StorageDirectoryReader */
|
||||||
const char *Read() override;
|
const char *Read() noexcept override;
|
||||||
StorageFileInfo GetInfo(bool follow) override;
|
StorageFileInfo GetInfo(bool follow) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
CompositeDirectoryReader::Read()
|
CompositeDirectoryReader::Read() noexcept
|
||||||
{
|
{
|
||||||
if (other != nullptr) {
|
if (other != nullptr) {
|
||||||
const char *name = other->Read();
|
const char *name = other->Read();
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
MemoryStorageDirectoryReader::Read()
|
MemoryStorageDirectoryReader::Read() noexcept
|
||||||
{
|
{
|
||||||
if (first)
|
if (first)
|
||||||
first = false;
|
first = false;
|
||||||
|
@ -60,7 +60,7 @@ public:
|
|||||||
:entries(std::move(_entries)), first(true) {}
|
:entries(std::move(_entries)), first(true) {}
|
||||||
|
|
||||||
/* virtual methods from class StorageDirectoryReader */
|
/* virtual methods from class StorageDirectoryReader */
|
||||||
const char *Read() override;
|
const char *Read() noexcept override;
|
||||||
StorageFileInfo GetInfo(bool follow) override;
|
StorageFileInfo GetInfo(bool follow) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -32,9 +32,9 @@ class StorageDirectoryReader {
|
|||||||
public:
|
public:
|
||||||
StorageDirectoryReader() = default;
|
StorageDirectoryReader() = default;
|
||||||
StorageDirectoryReader(const StorageDirectoryReader &) = delete;
|
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.
|
* Throws #std::runtime_error on error.
|
||||||
@ -46,7 +46,7 @@ class Storage {
|
|||||||
public:
|
public:
|
||||||
Storage() = default;
|
Storage() = default;
|
||||||
Storage(const Storage &) = delete;
|
Storage(const Storage &) = delete;
|
||||||
virtual ~Storage() {}
|
virtual ~Storage() noexcept {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Throws #std::runtime_error on error.
|
* Throws #std::runtime_error on error.
|
||||||
|
@ -41,7 +41,7 @@ public:
|
|||||||
:base_fs(std::move(_base_fs)), reader(base_fs) {}
|
:base_fs(std::move(_base_fs)), reader(base_fs) {}
|
||||||
|
|
||||||
/* virtual methods from class StorageDirectoryReader */
|
/* virtual methods from class StorageDirectoryReader */
|
||||||
const char *Read() override;
|
const char *Read() noexcept override;
|
||||||
StorageFileInfo GetInfo(bool follow) override;
|
StorageFileInfo GetInfo(bool follow) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -156,7 +156,7 @@ SkipNameFS(PathTraitsFS::const_pointer_type name_fs) noexcept
|
|||||||
}
|
}
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
LocalDirectoryReader::Read()
|
LocalDirectoryReader::Read() noexcept
|
||||||
{
|
{
|
||||||
while (reader.ReadEntry()) {
|
while (reader.ReadEntry()) {
|
||||||
const Path name_fs = reader.GetEntry();
|
const Path name_fs = reader.GetEntry();
|
||||||
|
@ -45,7 +45,7 @@ public:
|
|||||||
virtual ~SmbclientDirectoryReader();
|
virtual ~SmbclientDirectoryReader();
|
||||||
|
|
||||||
/* virtual methods from class StorageDirectoryReader */
|
/* virtual methods from class StorageDirectoryReader */
|
||||||
const char *Read() override;
|
const char *Read() noexcept override;
|
||||||
StorageFileInfo GetInfo(bool follow) override;
|
StorageFileInfo GetInfo(bool follow) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -158,7 +158,7 @@ SmbclientDirectoryReader::~SmbclientDirectoryReader()
|
|||||||
}
|
}
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
SmbclientDirectoryReader::Read()
|
SmbclientDirectoryReader::Read() noexcept
|
||||||
{
|
{
|
||||||
const std::lock_guard<Mutex> protect(smbclient_mutex);
|
const std::lock_guard<Mutex> protect(smbclient_mutex);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user