From 1d7b79b85ac70b3dec8dff5ec7a3d44bf20bd0ba Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 24 Sep 2001 05:59:13 +0000 Subject: [PATCH] Suppressed most warning (except some unused variables) if you don't modify anythig --- eo/tutorial/Templates/mutation.tmpl | 11 ++++++----- eo/tutorial/Templates/quadCrossover.tmpl | 11 ++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/eo/tutorial/Templates/mutation.tmpl b/eo/tutorial/Templates/mutation.tmpl index 2b66be2c..befbcea9 100644 --- a/eo/tutorial/Templates/mutation.tmpl +++ b/eo/tutorial/Templates/mutation.tmpl @@ -46,15 +46,16 @@ public: */ bool operator()(GenotypeT & _genotype) { + bool isModified; // START code for mutation of the _genotype object /** Requirement - * if _genotype has been modified - * return true; - * otherwise - * return false; + * if (_genotype has been modified) + * isModified = true; + * else + * isModified = false; */ - + return isModified; // END code for mutation of the _genotype object } diff --git a/eo/tutorial/Templates/quadCrossover.tmpl b/eo/tutorial/Templates/quadCrossover.tmpl index 35554312..13145004 100644 --- a/eo/tutorial/Templates/quadCrossover.tmpl +++ b/eo/tutorial/Templates/quadCrossover.tmpl @@ -48,15 +48,16 @@ public: */ bool operator()(GenotypeT& _genotype1, GenotypeT & _genotype2) { + bool oneAtLeastIsModified; // START code for crossover of _genotype1 and _genotype2 objects /** Requirement - * if at least one genotype has been modified - no way to distinguish - * return true; - * otherwise - * return false; + * if (at least one genotype has been modified) // no way to distinguish + * oneAtLeastIsModified = true; + * else + * oneAtLeastIsModified = false; */ - + return oneAtLeastIsModified; // END code for crossover of _genotype1 and _genotype2 objects }