*: 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
+5 -5
View File
@@ -87,9 +87,9 @@ 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;
/* virtual methods from NfsLease */
void OnNfsConnectionReady() final {
@@ -223,7 +223,7 @@ UriToNfsPath(const char *_uri_utf8)
}
std::string
NfsStorage::MapUTF8(const char *uri_utf8) const
NfsStorage::MapUTF8(const char *uri_utf8) const noexcept
{
assert(uri_utf8 != nullptr);
@@ -234,7 +234,7 @@ NfsStorage::MapUTF8(const char *uri_utf8) const
}
const char *
NfsStorage::MapToRelativeUTF8(const char *uri_utf8) const
NfsStorage::MapToRelativeUTF8(const char *uri_utf8) const noexcept
{
return PathTraitsUTF8::Relative(base.c_str(), uri_utf8);
}
@@ -291,7 +291,7 @@ NfsStorage::GetInfo(const char *uri_utf8, gcc_unused bool follow)
gcc_pure
static bool
SkipNameFS(const char *name)
SkipNameFS(const char *name) noexcept
{
return name[0] == '.' &&
(name[1] == 0 ||