summaryrefslogtreecommitdiffstats
path: root/src/corelib/text/qbytearraymatcher.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-05-11 10:26:50 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-06-25 10:19:09 +0200
commita418fd5cbbf2d121c93d27194c02eb36aa4ac97e (patch)
tree2839c20b8ddcc420528181b55e4a856315a83418 /src/corelib/text/qbytearraymatcher.h
parente721ec269e972ea2754cb9bd27fb73b72ed53c7b (diff)
Improve casting
Make a handful of narrowing casts explicit Change-Id: I318e9778840f2437963377b6b97f269d569909dc Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Diffstat (limited to 'src/corelib/text/qbytearraymatcher.h')
-rw-r--r--src/corelib/text/qbytearraymatcher.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/text/qbytearraymatcher.h b/src/corelib/text/qbytearraymatcher.h
index 95de7416a0..c923bd15d5 100644
--- a/src/corelib/text/qbytearraymatcher.h
+++ b/src/corelib/text/qbytearraymatcher.h
@@ -101,7 +101,7 @@ private:
static Q_DECL_RELAXED_CONSTEXPR Skiptable generate(const char *pattern, uint n) noexcept
{
const auto uchar_max = (std::numeric_limits<uchar>::max)();
- uchar max = n > uchar_max ? uchar_max : n;
+ uchar max = n > uchar_max ? uchar_max : uchar(n);
Skiptable table = {
// this verbose initialization code aims to avoid some opaque error messages
// even on powerful compilers such as GCC 5.3. Even though for GCC a loop