<URL: http://bugs.freeciv.org/Ticket/Display.html?id=39563 >

Thank you for finding my mistake in PR#39553!

This worthless function is only called 4 places, and the first place I've
looked is:

ai/advmilitary.c:1223:

   if (best_choice.want > choice->want) {
     /* We want attacker more than what we have selected before */
     copy_if_better_choice(&best_choice, choice);


That expands to:

   if (best_choice.want > choice->want) {
     /* We want attacker more than what we have selected before */
     if (choice->want < best_choice->want) {
       choice = best_choice;

So, this test (and function) is redundant....



_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to