Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2005:
[Freeciv-Dev] (PR#13056) Fix requirements bug
Home

[Freeciv-Dev] (PR#13056) Fix requirements bug

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: per@xxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#13056) Fix requirements bug
From: "Vasco Alexandre da Silva Costa" <vasc@xxxxxxxxxxxxxx>
Date: Sat, 14 May 2005 08:38:11 -0700
Reply-to: bugs@xxxxxxxxxxx

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

> [vasc - Sat May 14 15:19:08 2005]:
> 
> On Sat, 14 May 2005, Per I. Mathisen wrote:
> 
> > <URL: http://bugs.freeciv.org/Ticket/Display.html?id=13056 >
> >
> > On Sat, 14 May 2005, Per I. Mathisen wrote:
> > > An iterator starts as a vector and ends as a list...
> >
> > I found five more of these... Someone been sloppy with copy&paste?
> 
> Maybe it was me. If it was me, sorry about that.

Here is a fix for some more.

Index: ai/aihand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/ai/aihand.c,v
retrieving revision 1.116
diff -u -u -r1.116 aihand.c
--- ai/aihand.c 11 May 2005 14:11:20 -0000      1.116
+++ ai/aihand.c 14 May 2005 15:37:30 -0000
@@ -333,7 +333,7 @@
          dist += MAX(1, num_unknown_techs_for_goal(pplayer,
                                                    preq->source.value.tech));
        }
-      } requirement_list_iterate_end;
+      } requirement_vector_iterate_end;
       val = amortize(val, dist);
       ai->government_want[gov->index] = val; /* Save want */
     } government_iterate_end;
@@ -366,7 +366,7 @@
          ai->goal.govt.req = preq->source.value.tech;
          break;
        }
-      } requirement_list_iterate_end;
+      } requirement_vector_iterate_end;
     }
   } government_iterate_end;
   /* Goodness of the ideal gov is calculated relative to the goodness of the
Index: ai/aitech.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/ai/aitech.c,v
retrieving revision 1.57
diff -u -u -r1.57 aitech.c
--- ai/aitech.c 11 May 2005 14:11:20 -0000      1.57
+++ ai/aitech.c 14 May 2005 15:37:30 -0000
@@ -249,7 +249,7 @@
            }
            cost += imprcost;
          }
-       } requirement_list_iterate_end;
+       } requirement_vector_iterate_end;
       }
 
       if (cost < best_cost) {

[Prev in Thread] Current Thread [Next in Thread]