summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2020-06-22 22:48:03 +0200
committerMax Kellermann <max@musicpd.org>2020-06-22 22:48:07 +0200
commit43c32372e7bd3e02edce0b4c2064a2a59e2b2166 (patch)
tree7e44762e8abf74c21742dfe2fb9b8590dd743f0a /src/util
parent5716cde1fbf027b1270179dcae700b3b974b1966 (diff)
util/UriUtil: make `schemes` array static
Diffstat (limited to 'src/util')
-rw-r--r--src/util/UriUtil.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/util/UriUtil.cxx b/src/util/UriUtil.cxx
index d8eee469c..c9100f4c0 100644
--- a/src/util/UriUtil.cxx
+++ b/src/util/UriUtil.cxx
@@ -167,7 +167,11 @@ gcc_pure
static const char *
SkipUriScheme(const char *uri) noexcept
{
- const char *const schemes[] = { "http://", "https://", "ftp://" };
+ static const char *const schemes[] = {
+ "http://", "https://",
+ "ftp://",
+ };
+
for (auto scheme : schemes) {
auto result = StringAfterPrefixCaseASCII(uri, scheme);
if (result != nullptr)