summaryrefslogtreecommitdiff
path: root/src/util/WStringCompare.hxx
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/util/WStringCompare.hxx
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/util/WStringCompare.hxx')
-rw-r--r--src/util/WStringCompare.hxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/util/WStringCompare.hxx b/src/util/WStringCompare.hxx
index ce5d3163d..03bb19794 100644
--- a/src/util/WStringCompare.hxx
+++ b/src/util/WStringCompare.hxx
@@ -42,20 +42,20 @@ StringIsEmpty(const wchar_t *string)
gcc_pure
bool
-StringStartsWith(const wchar_t *haystack, const wchar_t *needle);
+StringStartsWith(const wchar_t *haystack, const wchar_t *needle) noexcept;
gcc_pure
bool
-StringEndsWith(const wchar_t *haystack, const wchar_t *needle);
+StringEndsWith(const wchar_t *haystack, const wchar_t *needle) noexcept;
/**
* Returns the portion of the string after a prefix. If the string
* does not begin with the specified prefix, this function returns
* nullptr.
*/
-gcc_nonnull_all
+gcc_pure gcc_nonnull_all
const wchar_t *
-StringAfterPrefix(const wchar_t *string, const wchar_t *prefix);
+StringAfterPrefix(const wchar_t *string, const wchar_t *prefix) noexcept;
/**
* Check if the given string ends with the specified suffix. If yes,
@@ -63,6 +63,6 @@ StringAfterPrefix(const wchar_t *string, const wchar_t *prefix);
*/
gcc_pure
const wchar_t *
-FindStringSuffix(const wchar_t *p, const wchar_t *suffix);
+FindStringSuffix(const wchar_t *p, const wchar_t *suffix) noexcept;
#endif