Author: sveinung
Date: Fri Mar 10 11:37:24 2017
New Revision: 35090

URL: http://svn.gna.org/viewcvs/freeciv?rev=35090&view=rev
Log:
Inline variables used only once.

See hrm Feature #643198

Modified:
    branches/S3_0/server/unithand.c

Modified: branches/S3_0/server/unithand.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/server/unithand.c?rev=35090&r1=35089&r2=35090&view=diff
==============================================================================
--- branches/S3_0/server/unithand.c     (original)
+++ branches/S3_0/server/unithand.c     Fri Mar 10 11:37:24 2017
@@ -3609,13 +3609,8 @@
        * it still looks like a target since move_do_not_act isn't set.
        * Assume that the intention is to do an action. */
 
-      struct unit *tunit = action_tgt_unit(punit, pdesttile, can_not_move);
-      struct city *tcity = action_tgt_city(punit, pdesttile, can_not_move);
-
-      /* If a tcity or a tunit exists it must be possible to act against it
-       * since action_tgt_city() or action_tgt_unit() wouldn't have
-       * targeted it otherwise. */
-      if (tcity || tunit
+      if (action_tgt_unit(punit, pdesttile, can_not_move)
+          || action_tgt_city(punit, pdesttile, can_not_move)
           || action_tgt_tile_units(punit, pdesttile, can_not_move)
           || ttile) {
         if (is_ai(pplayer)) {


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

Reply via email to