From 52b2fc58df589cb211e99286d0c2d95c29b1c070 Mon Sep 17 00:00:00 2001 From: Igor Bogoslavskyi Date: Tue, 31 Jan 2017 11:06:35 +0100 Subject: [PATCH] fix build error on Ubuntu 16.04 --- Evolve.pro | 6 ++---- mutation.cpp | 2 +- widget.cpp | 3 ++- 3 files changed, 5 insertions(+), 6 deletions(-) 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