*: add "noexcept" to many, many function prototypes

This eliminates some overhead, because the compiler doesn't need to
consider these functions throwing.
This commit is contained in:
Max Kellermann
2017-05-08 14:44:49 +02:00
parent ac2e4e593d
commit 71f0ed8b74
272 changed files with 873 additions and 846 deletions

View File

@@ -69,13 +69,13 @@ public:
StorageDirectoryReader *OpenDirectory(const char *uri_utf8) override;
std::string MapUTF8(const char *uri_utf8) const override;
std::string MapUTF8(const char *uri_utf8) const noexcept override;
const char *MapToRelativeUTF8(const char *uri_utf8) const override;
const char *MapToRelativeUTF8(const char *uri_utf8) const noexcept override;
};
std::string
SmbclientStorage::MapUTF8(const char *uri_utf8) const
SmbclientStorage::MapUTF8(const char *uri_utf8) const noexcept
{
assert(uri_utf8 != nullptr);
@@ -86,7 +86,7 @@ SmbclientStorage::MapUTF8(const char *uri_utf8) const
}
const char *
SmbclientStorage::MapToRelativeUTF8(const char *uri_utf8) const
SmbclientStorage::MapToRelativeUTF8(const char *uri_utf8) const noexcept
{
return PathTraitsUTF8::Relative(base.c_str(), uri_utf8);
}
@@ -143,7 +143,7 @@ SmbclientStorage::OpenDirectory(const char *uri_utf8)
gcc_pure
static bool
SkipNameFS(const char *name)
SkipNameFS(const char *name) noexcept
{
return name[0] == '.' &&
(name[1] == 0 ||