From 535827e8d2f77e7cf10f6b13b1dd02c5076aef66 Mon Sep 17 00:00:00 2001 From: yboucher <yann.boucher@etu.utc.fr> Date: Sat, 5 Jun 2021 23:52:40 +0200 Subject: [PATCH] Ignorer la cellule centrale pour le voisinage de von neumann aussi --- src/neighborhood_rules/vonNeumannNeighborhoodRule.cpp | 4 +++- src/src.pro | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/neighborhood_rules/vonNeumannNeighborhoodRule.cpp b/src/neighborhood_rules/vonNeumannNeighborhoodRule.cpp index f67f347..59ce070 100644 --- a/src/neighborhood_rules/vonNeumannNeighborhoodRule.cpp +++ b/src/neighborhood_rules/vonNeumannNeighborhoodRule.cpp @@ -17,7 +17,9 @@ vonNeumannNeighborhoodRule::vonNeumannNeighborhoodRule(int _radius) if( abs(i+j) <= _radius) { newCord.x = i; newCord.y = j; - format.positions.push_back(newCord); + if(!(newCord.x == 0 && newCord.y == 0)) { + format.positions.push_back(newCord); + } } } } diff --git a/src/src.pro b/src/src.pro index deee726..a46c4dc 100644 --- a/src/src.pro +++ b/src/src.pro @@ -5,6 +5,9 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++14 TEMPLATE = app +# Optimisations, flag pour garder les infos de debug +QMAKE_CXXFLAGS += -O2 -g + # You can make your code fail to compile if it uses deprecated APIs. # In order to do so, uncomment the following line. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 -- GitLab