summaryrefslogtreecommitdiff
path: root/src/sticker
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2017-05-08 14:44:49 +0200
committerMax Kellermann <max@musicpd.org>2017-05-08 14:44:49 +0200
commit71f0ed8b7499011b53f90998ebfbd3250fd80948 (patch)
treee9c2f66fbef231858f46d878864199d46e6ce21c /src/sticker
parentac2e4e593d407e41db49fdb9ae2da6bc1557f618 (diff)
*: add "noexcept" to many, many function prototypes
This eliminates some overhead, because the compiler doesn't need to consider these functions throwing.
Diffstat (limited to 'src/sticker')
-rw-r--r--src/sticker/StickerDatabase.cxx4
-rw-r--r--src/sticker/StickerDatabase.hxx4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/sticker/StickerDatabase.cxx b/src/sticker/StickerDatabase.cxx
index b8ec42ead..d51b6bf96 100644
--- a/src/sticker/StickerDatabase.cxx
+++ b/src/sticker/StickerDatabase.cxx
@@ -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())
diff --git a/src/sticker/StickerDatabase.hxx b/src/sticker/StickerDatabase.hxx
index ec929af11..e533fbfbe 100644
--- a/src/sticker/StickerDatabase.hxx
+++ b/src/sticker/StickerDatabase.hxx
@@ -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.