Author: sveinung
Date: Tue Mar 10 12:19:39 2015
New Revision: 28481

URL: http://svn.gna.org/viewcvs/freeciv?rev=28481&view=rev
Log:
rscompat: Remove redundant action enabler requirement vector initialization.

Action enabler requirement vector initialization is already done in
action_enabler_new(). There is no need to do it by hand while adding
compatibility action enablers.

See patch #5922

Modified:
    trunk/server/rscompat.c

Modified: trunk/server/rscompat.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/rscompat.c?rev=28481&r1=28480&r2=28481&view=diff
==============================================================================
--- trunk/server/rscompat.c     (original)
+++ trunk/server/rscompat.c     Tue Mar 10 12:19:39 2015
@@ -199,7 +199,6 @@
     /* The actor unit must have the unit type flag Capturer, belong to a
      * player that is at war with each player that owns a target unit and
      * have at least one move fragment left. */
-    requirement_vector_init(&(capture->actor_reqs));
     requirement_vector_append(&capture->actor_reqs,
                               req_from_str("UnitFlag", "Local", FALSE,
                                            TRUE, "Capturer"));
@@ -212,7 +211,6 @@
 
     /* The target unit(s) must all have the Capturable unit type flag and
      * can't be inside a city. */
-    requirement_vector_init(&(capture->target_reqs));
     requirement_vector_append(&capture->target_reqs,
                               req_from_str("UnitFlag", "Local", FALSE,
                                            TRUE, "Capturable"));


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

Reply via email to