*: 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:
@@ -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())
|
||||
|
@@ -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.
|
||||
|
Reference in New Issue
Block a user