Bug 5094 - Code cleanup, patch by Zack Middleton and DevHC. Fixes unused-but-set gcc warnings
This commit is contained in:
parent
1ea7ab1f42
commit
23f6fd1633
85 changed files with 246 additions and 496 deletions
|
@ -51,7 +51,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
//===========================================================================
|
||||
int GeneticSelection(int numranks, float *rankings)
|
||||
{
|
||||
float sum, select;
|
||||
float sum;
|
||||
int i, index;
|
||||
|
||||
sum = 0;
|
||||
|
@ -64,7 +64,7 @@ int GeneticSelection(int numranks, float *rankings)
|
|||
{
|
||||
//select a bot where the ones with the higest rankings have
|
||||
//the highest chance of being selected
|
||||
select = random() * sum;
|
||||
//sum *= random();
|
||||
for (i = 0; i < numranks; i++)
|
||||
{
|
||||
if (rankings[i] < 0) continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue