diff options
Diffstat (limited to 'games/xarchon/patches/patch-an')
-rw-r--r-- | games/xarchon/patches/patch-an | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/games/xarchon/patches/patch-an b/games/xarchon/patches/patch-an new file mode 100644 index 00000000000..bce6bf3c1f0 --- /dev/null +++ b/games/xarchon/patches/patch-an @@ -0,0 +1,35 @@ +$NetBSD: patch-an,v 1.1 2006/04/28 16:23:55 joerg Exp $ + +--- src/Genetic.hpp.orig 2006-04-28 16:16:16.000000000 +0000 ++++ src/Genetic.hpp +@@ -216,9 +216,9 @@ public: + virtual Genetic_Operator<T> *Choose_Operator(void) + { + int max=(int)total_op_weight; +- list<Genetic_Operator<T> *>::iterator start=operators.begin(); +- list<Genetic_Operator<T> *>::iterator end=operators.end(); +- list<Genetic_Operator<T> *>::iterator iter; ++ typename list<Genetic_Operator<T> *>::iterator start=operators.begin(); ++ typename list<Genetic_Operator<T> *>::iterator end=operators.end(); ++ typename list<Genetic_Operator<T> *>::iterator iter; + int r=rand()%max; + int count=0; + for (iter=start;iter!=end;iter++) { +@@ -249,7 +249,7 @@ public: + Genetic_Population<T> *newpop=new Genetic_Population<T>(p->size); + int cur_size=0; + while (cur_size<newpop->size) { +- Genetic_Operator<T> *op=Choose_Operator(); ++ Genetic_Operator<T> *op=this->Choose_Operator(); + if ( (cur_size+op->NumOfResults())>newpop->size) + continue; + for (i=0;i<op->NumOfOperands();i++) { +@@ -264,7 +264,7 @@ public: + cur_size++; + } + } +- newpop->Eval_Fitness(fit_func); ++ newpop->Eval_Fitness(this->fit_func); + return newpop; + } + |