Author: cazfi
Date: Sun Jun 12 14:50:58 2016
New Revision: 32839

URL: http://svn.gna.org/viewcvs/freeciv?rev=32839&view=rev
Log:
Inlined is_native_tile_to_class().

See patch #7201

Modified:
    branches/S2_6/common/movement.c
    branches/S2_6/common/movement.h

Modified: branches/S2_6/common/movement.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/common/movement.c?rev=32839&r1=32838&r2=32839&view=diff
==============================================================================
--- branches/S2_6/common/movement.c     (original)
+++ branches/S2_6/common/movement.c     Sun Jun 12 14:50:58 2016
@@ -267,19 +267,6 @@
                     const struct tile *ptile)
 {
   return is_native_to_class(utype_class(punittype), tile_terrain(ptile),
-                            tile_extras(ptile));
-}
-
-
-/****************************************************************************
-  This tile is native to unit class.
-
-  See is_native_to_class()
-****************************************************************************/
-bool is_native_tile_to_class(const struct unit_class *punitclass,
-                             const struct tile *ptile)
-{
-  return is_native_to_class(punitclass, tile_terrain(ptile),
                             tile_extras(ptile));
 }
 

Modified: branches/S2_6/common/movement.h
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/common/movement.h?rev=32839&r1=32838&r2=32839&view=diff
==============================================================================
--- branches/S2_6/common/movement.h     (original)
+++ branches/S2_6/common/movement.h     Sun Jun 12 14:50:58 2016
@@ -64,11 +64,23 @@
 
 bool is_native_tile(const struct unit_type *punittype,
                     const struct tile *ptile);
-bool is_native_tile_to_class(const struct unit_class *punitclass,
-                             const struct tile *ptile);
+
 bool is_native_to_class(const struct unit_class *punitclass,
                         const struct terrain *pterrain,
                         const bv_extras *extras);
+
+/****************************************************************************
+  Check if this tile is native to given unit class.
+
+  See is_native_to_class()
+****************************************************************************/
+static inline bool is_native_tile_to_class(const struct unit_class *punitclass,
+                                           const struct tile *ptile)
+{
+  return is_native_to_class(punitclass, tile_terrain(ptile),
+                            tile_extras(ptile));
+}
+
 bool is_native_move(const struct unit_class *punitclass,
                     const struct tile *src_tile,
                     const struct tile *dst_tile);


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

Reply via email to