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

@@ -151,7 +151,7 @@ sticker_global_finish()
}
bool
sticker_enabled()
sticker_enabled() noexcept
{
return sticker_db != nullptr;
}
@@ -328,7 +328,7 @@ sticker_free(Sticker *sticker)
}
const char *
sticker_get_value(const Sticker &sticker, const char *name)
sticker_get_value(const Sticker &sticker, const char *name) noexcept
{
auto i = sticker.table.find(name);
if (i == sticker.table.end())

View File

@@ -69,7 +69,7 @@ sticker_global_finish();
*/
gcc_const
bool
sticker_enabled();
sticker_enabled() noexcept;
/**
* Returns one value from an object's sticker record. Returns an
@@ -125,7 +125,7 @@ sticker_free(Sticker *sticker);
*/
gcc_pure
const char *
sticker_get_value(const Sticker &sticker, const char *name);
sticker_get_value(const Sticker &sticker, const char *name) noexcept;
/**
* Iterates over all sticker items in a sticker.