From: Manuel Nickschas Date: Sun, 3 Sep 2017 23:43:24 +0000 (+0200) Subject: common: Fix build with Qt4 and/or MSVC X-Git-Tag: travis-deploy-test~258 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=0fa9ff5b58bf321654204867bb118a8d727d7b16 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...). --- 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]; }); }