aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4ssa.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@digia.com>2014-03-05 15:34:08 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-07 11:00:45 +0100
commit90487ebb7584bde9283e154228b9494e3b7bd8fe (patch)
treeacf5e57172e48feaf69cda001ec69f554c85f155 /src/qml/compiler/qv4ssa.cpp
parent1ca5e82cccae04b3f0e91f6445811b967018b477 (diff)
Fix more MSVC2012 compiler warnings.
All are conversions from size_t to int or to unsigned. Change-Id: Ic94c938dcad6d50a32dd6ec62da2341869cf994d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4ssa.cpp')
-rw-r--r--src/qml/compiler/qv4ssa.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/qml/compiler/qv4ssa.cpp b/src/qml/compiler/qv4ssa.cpp
index e2c88c88f4..847df6ecac 100644
--- a/src/qml/compiler/qv4ssa.cpp
+++ b/src/qml/compiler/qv4ssa.cpp
@@ -315,10 +315,12 @@ public:
public:
BasicBlock *operator*() const
{
- if (set.blockNumbers)
+ if (set.blockNumbers) {
return set.allBlocks.at(*numberIt);
- else
- return set.allBlocks.at(flagIt);
+ } else {
+ Q_ASSERT(flagIt <= INT_MAX);
+ return set.allBlocks.at(static_cast<int>(flagIt));
+ }
}
bool operator==(const const_iterator &other) const
@@ -490,7 +492,8 @@ class DominatorTree {
BasicBlockIndex b = InvalidBasicBlockIndex;
BasicBlockIndex last = worklist.back();
- for (int it = worklist.size() - 2; it >= 0; --it) {
+ Q_ASSERT(worklist.size() <= INT_MAX);
+ for (int it = static_cast<int>(worklist.size()) - 2; it >= 0; --it) {
BasicBlockIndex bbIt = worklist[it];
ancestor[bbIt] = last;
BasicBlockIndex &best_it = best[bbIt];