*: 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

@@ -64,13 +64,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
CurlStorage::MapUTF8(const char *uri_utf8) const
CurlStorage::MapUTF8(const char *uri_utf8) const noexcept
{
assert(uri_utf8 != nullptr);
@@ -83,7 +83,7 @@ CurlStorage::MapUTF8(const char *uri_utf8) const
}
const char *
CurlStorage::MapToRelativeUTF8(const char *uri_utf8) const
CurlStorage::MapToRelativeUTF8(const char *uri_utf8) const noexcept
{
// TODO: escape/unescape?
@@ -475,7 +475,7 @@ CurlStorage::GetInfo(const char *uri_utf8, gcc_unused bool follow)
gcc_pure
static const char *
UriPathOrSlash(const char *uri)
UriPathOrSlash(const char *uri) noexcept
{
const char *path = uri_get_path(uri);
if (path == nullptr)