Commit 6f456374 authored by Andrius Štikonas's avatar Andrius Štikonas

Use C++11 ranged based for.

parent a9c0fe02
project(kjumpingcube)
cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR)
set (QT_MIN_VERSION "5.3.0")
set (QT_MIN_VERSION "5.7.0")
set (KF5_MIN_VERSION "5.15.0")
find_package(ECM 1.7.0 REQUIRED CONFIG)
......
......@@ -606,7 +606,7 @@ void AI_Main::dumpStats()
qDebug() << m_moveStats.count() << "MOVES IN THIS GAME";
AI_Box * statsBox = new AI_Box (0, m_side);
statsBox->printBox();
foreach (MoveStats * m, m_moveStats) {
for (MoveStats * m : qAsConst(m_moveStats)) {
QList<int> l;
int nMax = m->searchStats->count();
for (int n = 0; n < nMax; n++) {
......
......@@ -86,7 +86,7 @@ bool KCubeBoxWidget::loadSettings()
void KCubeBoxWidget::reset() // Called if a player wins or requests New game.
{
foreach (KCubeWidget * cube, cubes) {
for (KCubeWidget * cube : qAsConst(cubes)) {
cube->reset();
}
......@@ -129,7 +129,7 @@ void KCubeBoxWidget::highlightDone()
void KCubeBoxWidget::setColors ()
{
foreach (KCubeWidget * cube, cubes) {
for (KCubeWidget * cube : qAsConst(cubes)) {
cube->updateColors();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment