diff options
author | Ivan Komissarov <abbapoh@gmail.com> | 2020-04-04 16:53:28 +0200 |
---|---|---|
committer | Ivan Komissarov <ABBAPOH@gmail.com> | 2020-04-14 16:33:35 +0000 |
commit | f5fde1eaaff08213a895f8051a625ef693222dad (patch) | |
tree | 4968fe8f5bc7242376ab1ed313bbed67c2504920 /src/lib/corelib/language/asttools.cpp | |
parent | e2e20d843faf260ef7a2e9ab2aa3fadccb57a7d4 (diff) |
clang-tidy: Fix 'bugprone-narrowing-conversions' warnings
Also, treat those as errors
Change-Id: I0771aa656273fd0a01c7787870d9de9b4c631823
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/lib/corelib/language/asttools.cpp')
-rw-r--r-- | src/lib/corelib/language/asttools.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/corelib/language/asttools.cpp b/src/lib/corelib/language/asttools.cpp index 617c8b95b..1b6abac7f 100644 --- a/src/lib/corelib/language/asttools.cpp +++ b/src/lib/corelib/language/asttools.cpp @@ -61,13 +61,13 @@ QString textOf(const QString &source, QbsQmlJS::AST::Node *node) if (!node) return {}; return source.mid(node->firstSourceLocation().begin(), - node->lastSourceLocation().end() - node->firstSourceLocation().begin()); + int(node->lastSourceLocation().end() - node->firstSourceLocation().begin())); } QStringRef textRefOf(const QString &source, QbsQmlJS::AST::Node *node) { const quint32 firstBegin = node->firstSourceLocation().begin(); - return source.midRef(firstBegin, node->lastSourceLocation().end() - firstBegin); + return source.midRef(firstBegin, int(node->lastSourceLocation().end() - firstBegin)); } } // namespace Internal |