diff --git a/Evolve.pro b/Evolve.pro index 9ed32f1..19ac8d6 100644 --- a/Evolve.pro +++ b/Evolve.pro @@ -34,8 +34,6 @@ FORMS += widget.ui \ progressdialog.ui \ settingswidget.ui -CONFIG += c++11 - -QMAKE_CXXFLAGS_RELEASE += -O3 -flto -march=native -mmmx # Crashes on some computers -QMAKE_CXXFLAGS_DEBUG += -Og -g -march=native -mmmx # Crashes on some computers +QMAKE_CXXFLAGS_RELEASE += -std=c++11 -O3 -flto -march=native -mmmx # Crashes on some computers +QMAKE_CXXFLAGS_DEBUG += -std=c++11 -Og -g -march=native -mmmx # Crashes on some computers #QMAKE_CXXFLAGS_DEBUG += -Og diff --git a/mutation.cpp b/mutation.cpp index 5579baa..c222ebe 100644 --- a/mutation.cpp +++ b/mutation.cpp @@ -66,7 +66,7 @@ void Widget::reorderPoly(QVector& newPolys, QImage &target) break; } int dest = qrand()%newPolys.size(); - Poly poly = newPolys.takeAt(source); + Poly poly = newPolys.at(source); newPolys.insert(dest, poly); redraw(target, newPolys); optimizeShape(dest, newPolys); diff --git a/widget.cpp b/widget.cpp index 1106e4c..c324693 100644 --- a/widget.cpp +++ b/widget.cpp @@ -9,7 +9,8 @@ #include #include #include -#include +#include +#include #include //#define TIME_FITNESS