diff options
author | Max Kellermann <max@musicpd.org> | 2017-05-08 14:44:49 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2017-05-08 14:44:49 +0200 |
commit | 71f0ed8b7499011b53f90998ebfbd3250fd80948 (patch) | |
tree | e9c2f66fbef231858f46d878864199d46e6ce21c /src/util/StringCompare.cxx | |
parent | ac2e4e593d407e41db49fdb9ae2da6bc1557f618 (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/StringCompare.cxx')
-rw-r--r-- | src/util/StringCompare.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/util/StringCompare.cxx b/src/util/StringCompare.cxx index 0eb99034d..58ac5a2c1 100644 --- a/src/util/StringCompare.cxx +++ b/src/util/StringCompare.cxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013-2015 Max Kellermann <max.kellermann@gmail.com> + * Copyright (C) 2013-2017 Max Kellermann <max.kellermann@gmail.com> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -30,7 +30,7 @@ #include "StringCompare.hxx" bool -StringEndsWith(const char *haystack, const char *needle) +StringEndsWith(const char *haystack, const char *needle) noexcept { const size_t haystack_length = strlen(haystack); const size_t needle_length = strlen(needle); @@ -41,7 +41,7 @@ StringEndsWith(const char *haystack, const char *needle) } const char * -FindStringSuffix(const char *p, const char *suffix) +FindStringSuffix(const char *p, const char *suffix) noexcept { const size_t p_length = strlen(p); const size_t suffix_length = strlen(suffix); |