aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4isel_moth.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@digia.com>2016-02-23 15:18:26 +0100
committerErik Verbruggen <erik.verbruggen@theqtcompany.com>2016-03-05 12:16:59 +0000
commit06d82fdbce5f647ac2651cc28eede456c681953c (patch)
tree50f7af92b9523eacd2a418a793a11411c16dffe1 /src/qml/compiler/qv4isel_moth.cpp
parent7179050ecf53634befba08cacee5f260ab373f0b (diff)
V4: Replace foreach with range based for loops for statements.
BasicBlock::statements() returns a const reference to a QVector, so it can safely be iterated over without qAsConst. Change-Id: If4e47e0e113adbc87253bb3478208a3a38fed9e2 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/compiler/qv4isel_moth.cpp')
-rw-r--r--src/qml/compiler/qv4isel_moth.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/compiler/qv4isel_moth.cpp b/src/qml/compiler/qv4isel_moth.cpp
index b3468848ca..dcedc54b6e 100644
--- a/src/qml/compiler/qv4isel_moth.cpp
+++ b/src/qml/compiler/qv4isel_moth.cpp
@@ -255,7 +255,7 @@ protected:
if (IR::Jump *jump = s->asJump()) {
IR::MoveMapping moves;
- foreach (IR::Stmt *succStmt, jump->target->statements()) {
+ for (IR::Stmt *succStmt : jump->target->statements()) {
if (IR::Phi *phi = succStmt->asPhi()) {
forceActivation(*phi->targetTemp);
for (int i = 0, ei = phi->d->incoming.size(); i != ei; ++i) {
@@ -404,7 +404,7 @@ void InstructionSelection::run(int functionIndex)
exceptionHandler = _block->catchBlock;
}
- foreach (IR::Stmt *s, _block->statements()) {
+ for (IR::Stmt *s : _block->statements()) {
_currentStatement = s;
if (s->location.isValid()) {