Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2004:
[Freeciv-Dev] Re: (PR#7545) [RfP] is_sea_usable is unused
Home

[Freeciv-Dev] Re: (PR#7545) [RfP] is_sea_usable is unused

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#7545) [RfP] is_sea_usable is unused
From: "Marko Lindqvist" <marko.lindqvist@xxxxxxxxxxx>
Date: Mon, 6 Dec 2004 07:56:18 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=7545 >

Jason Short wrote:
> 
> The is_sea_usable function is unused and should be removed.

  Not only currently unused, but would likely require rewriting before 
being applicable for any future use.


  - ML

diff -Nurd -X.diff_ignore freeciv/common/map.c freeciv/common/map.c
--- freeciv/common/map.c        2004-12-05 16:10:21.799576500 +0200
+++ freeciv/common/map.c        2004-12-06 17:39:14.140625000 +0200
@@ -708,21 +708,6 @@
   return FALSE;
 }
 
-/***************************************************************
-Returns whether you can put a city on land near enough to use
-the tile.
-***************************************************************/
-bool is_sea_usable(const struct tile *ptile)
-{
-  map_city_radius_iterate(ptile, tile1) {
-    if (!is_ocean(map_get_terrain(tile1))) {
-      return TRUE;
-    }
-  } map_city_radius_iterate_end;
-
-  return FALSE;
-}
-
 /****************************************************************************
   Return the output of this type provided by the tile.  This includes base
   terrain plus S_SPECIAL_1 and S_SPECIAL_2, but not any other specials
diff -Nurd -X.diff_ignore freeciv/common/map.h freeciv/common/map.h
--- freeciv/common/map.h        2004-12-05 16:10:21.815162500 +0200
+++ freeciv/common/map.h        2004-12-06 17:39:22.015625000 +0200
@@ -385,7 +385,6 @@
 const char *get_special_name(enum tile_special_type type);
 bool is_safe_ocean(const struct tile *ptile);
 bool is_cardinally_adj_to_ocean(const struct tile *ptile);
-bool is_sea_usable(const struct tile *ptile);
 int get_tile_output_base(const struct tile *ptile, Output_type_id output);
 enum tile_special_type get_tile_infrastructure_set(const struct tile *ptile);
 const char *map_get_infrastructure_text(enum tile_special_type spe);

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: (PR#7545) [RfP] is_sea_usable is unused, Marko Lindqvist <=