[Avida-SVN] r2981 - branches/hjg-dev/source/cpu

hjg at myxo.css.msu.edu hjg at myxo.css.msu.edu
Wed Nov 26 19:14:09 PST 2008


Author: hjg
Date: 2008-11-26 22:14:09 -0500 (Wed, 26 Nov 2008)
New Revision: 2981

Modified:
   branches/hjg-dev/source/cpu/cHardwareCPU.cc
Log:
bug fix

Modified: branches/hjg-dev/source/cpu/cHardwareCPU.cc
===================================================================
--- branches/hjg-dev/source/cpu/cHardwareCPU.cc	2008-11-27 02:44:11 UTC (rev 2980)
+++ branches/hjg-dev/source/cpu/cHardwareCPU.cc	2008-11-27 03:14:09 UTC (rev 2981)
@@ -3711,6 +3711,8 @@
 			if (neighbor_shade_of_gb >=  shade_of_gb) {
 		//		const cGenome & neighbor_genome = neighbor->GetGenome();
 			
+				found = true;
+
 /*				// for each instruction in the genome...
 				for(int i=0;i<neighbor_genome.GetSize();i++){
 				
@@ -3726,7 +3728,7 @@
 		}
 		
 		// stop searching through the neighbors if we already found one
-		if (found == true);{
+		if (found == true){
     	break;
 		}
 		
@@ -3789,13 +3791,14 @@
       if (neighbor != NULL && neighbor->GetPhenotype().IsDonorTrueGbLast()) {
    //       const cGenome & neighbor_genome = neighbor->GetGenome();
 
+				found = true;
+
 				/*
           // for each instruction in the genome...
           for(int i=0;i<neighbor_genome.GetSize();i++){
 
             // ...see if it is donate-tgb, if so, we found a target
             if (neighbor_genome[i] == IP().GetInst()) {
-              found = true;
               break;
             }
 	    
@@ -3804,7 +3807,7 @@
       }
       
       // stop searching through the neighbors if we already found one
-      if (found == true);{
+      if (found == true){
     	break;
       }
   




More information about the Avida-cvs mailing list