From 0fa9ff5b58bf321654204867bb118a8d727d7b16 Mon Sep 17 00:00:00 2001 From: Manuel Nickschas Date: Mon, 4 Sep 2017 01:43:24 +0200 Subject: [PATCH] common: Fix build with Qt4 and/or MSVC The previous commit caused a build failure for some combinations of our build matrix, as QChar is not actually a literal usable in a constexpr (unless you enable Qt5, for some bizarre reason...). --- src/common/util.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/util.cpp b/src/common/util.cpp index 695ca4ad..3d199a12 100644 --- a/src/common/util.cpp +++ b/src/common/util.cpp @@ -64,8 +64,8 @@ QString hostFromMask(const QString &mask) bool isChannelName(const QString &str) { - static constexpr std::array prefixes{{'#', '&', '!', '+'}}; - return std::any_of(prefixes.cbegin(), prefixes.cend(), [&str](QChar c) { return c == str[0]; }); + static constexpr std::array prefixes{{'#', '&', '!', '+'}}; + return std::any_of(prefixes.cbegin(), prefixes.cend(), [&str](quint8 c) { return c == str[0]; }); } -- 2.20.1