summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qvector.h
diff options
context:
space:
mode:
authorMartin Koller <kollix@aon.at>2020-03-07 21:57:57 +0100
committerMartin Koller <kollix@aon.at>2020-04-11 09:42:37 +0100
commitce672e1c9b1d6272ff8ce6fc626f61f7f3adce06 (patch)
tree5d3575b8ae70d5b9b019f18a5ef223dd4df1c6fd /src/corelib/tools/qvector.h
parent033d01bd6e2aef740ad1408a04d3ca0ae3b9ba9b (diff)
avoid compile warning when using clang++ with -Wshorten-64-to-32
Change-Id: I78a6cd84ac5b8c250d9569d864a7e38269b85e10 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qvector.h')
-rw-r--r--src/corelib/tools/qvector.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h
index f973907714..88c942ca15 100644
--- a/src/corelib/tools/qvector.h
+++ b/src/corelib/tools/qvector.h
@@ -671,7 +671,7 @@ int indexOf(const QVector<T> &vector, const U &u, int from)
auto e = vector.end();
while (++n != e)
if (*n == u)
- return n - vector.begin();
+ return int(n - vector.begin());
}
return -1;
}
@@ -688,7 +688,7 @@ int lastIndexOf(const QVector<T> &vector, const U &u, int from)
auto n = vector.begin() + from + 1;
while (n != b) {
if (*--n == u)
- return n - b;
+ return int(n - b);
}
}
return -1;