[Freeciv-Dev] Re: (PR#11604) Sprinkling some more consts
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: |
[Freeciv-Dev] Re: (PR#11604) Sprinkling some more consts |
From: |
"Frédéric Brière" <fbriere@xxxxxxxxxxx> |
Date: |
Sun, 19 Dec 2004 15:18:24 -0800 |
Reply-to: |
bugs@xxxxxxxxxxx |
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=11604 >
Here's an updated patch that applies cleanly to the latest
client/tilespec.[ch].
--
Frédéric Brière <*> fbriere@xxxxxxxxxxx
=> <fbriere@xxxxxxxxxx> IS NO MORE: <http://www.abacomsucks.com> <=
Index: client/climisc.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/climisc.c,v
retrieving revision 1.146
diff -u -r1.146 climisc.c
--- client/climisc.c 12 Dec 2004 03:44:47 -0000 1.146
+++ client/climisc.c 19 Dec 2004 11:34:53 -0000
@@ -975,7 +975,7 @@
distance Parameter sq_dist may be NULL. Returns NULL only if no city is
known. Favors punit owner's cities over other cities if equally distant.
**************************************************************************/
-struct city *get_nearest_city(struct unit *punit, int *sq_dist)
+struct city *get_nearest_city(const struct unit *punit, int *sq_dist)
{
struct city *pcity_near;
int pcity_near_dist;
Index: client/climisc.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/climisc.h,v
retrieving revision 1.52
diff -u -r1.52 climisc.h
--- client/climisc.h 12 Dec 2004 03:44:47 -0000 1.52
+++ client/climisc.h 19 Dec 2004 11:34:53 -0000
@@ -116,7 +120,7 @@
void reports_thaw(void);
void reports_force_thaw(void);
-struct city *get_nearest_city(struct unit *punit, int *sq_dist);
+struct city *get_nearest_city(const struct unit *punit, int *sq_dist);
void cityrep_buy(struct city *pcity);
void common_taxrates_callback(int i);
Index: client/mapview_common.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/mapview_common.c,v
retrieving revision 1.166
diff -u -r1.166 mapview_common.c
--- client/mapview_common.c 16 Dec 2004 18:59:28 -0000 1.166
+++ client/mapview_common.c 19 Dec 2004 11:34:53 -0000
@@ -869,7 +869,7 @@
Draw the given unit onto the canvas store at the given location. The
area of drawing is UNIT_TILE_HEIGHT x UNIT_TILE_WIDTH.
**************************************************************************/
-void put_unit(struct unit *punit,
+void put_unit(const struct unit *punit,
struct canvas *pcanvas, int canvas_x, int canvas_y)
{
struct drawn_sprite drawn_sprites[40];
Index: client/mapview_common.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/mapview_common.h,v
retrieving revision 1.83
diff -u -r1.83 mapview_common.h
--- client/mapview_common.h 16 Dec 2004 18:59:28 -0000 1.83
+++ client/mapview_common.h 19 Dec 2004 11:34:54 -0000
@@ -159,7 +159,7 @@
bool tile_visible_mapcanvas(struct tile *ptile);
bool tile_visible_and_not_on_border_mapcanvas(struct tile *ptile);
-void put_unit(struct unit *punit,
+void put_unit(const struct unit *punit,
struct canvas *pcanvas, int canvas_x, int canvas_y);
void put_city(struct city *pcity,
struct canvas *pcanvas, int canvas_x, int canvas_y);
Index: client/tilespec.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/tilespec.c,v
retrieving revision 1.222
diff -u -r1.222 tilespec.c
--- client/tilespec.c 19 Dec 2004 19:22:30 -0000 1.222
+++ client/tilespec.c 19 Dec 2004 23:05:22 -0000
@@ -1845,7 +1845,7 @@
/**********************************************************************
...
***********************************************************************/
-static struct Sprite *get_unit_nation_flag_sprite(struct unit *punit)
+static struct Sprite *get_unit_nation_flag_sprite(const struct unit *punit)
{
return get_nation_by_plr(unit_owner(punit))->flag_sprite;
}
@@ -1957,7 +1957,7 @@
Fill in the sprite array for the unit
***********************************************************************/
static int fill_unit_sprite_array(struct drawn_sprite *sprs,
- struct unit *punit,
+ const struct unit *punit,
bool stack, bool backdrop)
{
struct drawn_sprite *save_sprs = sprs;
@@ -2645,7 +2645,7 @@
****************************************************************************/
int fill_sprite_array(struct drawn_sprite *sprs, enum mapview_layer layer,
struct tile *ptile,
- struct unit *punit, struct city *pcity,
+ const struct unit *punit, struct city *pcity,
bool citymode)
{
Terrain_type_id ttype, ttype_near[8];
Index: client/tilespec.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/tilespec.h,v
retrieving revision 1.95
diff -u -r1.95 tilespec.h
--- client/tilespec.h 19 Dec 2004 19:22:30 -0000 1.95
+++ client/tilespec.h 19 Dec 2004 23:05:22 -0000
@@ -113,7 +113,7 @@
int fill_sprite_array(struct drawn_sprite *sprs, enum mapview_layer layer,
struct tile *ptile,
- struct unit *punit, struct city *pcity,
+ const struct unit *punit, struct city *pcity,
bool citymode);
enum color_std player_color(const struct player *pplayer);
Index: client/mapctrl_common.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/mapctrl_common.c,v
retrieving revision 1.43
diff -u -r1.43 mapctrl_common.c
--- client/mapctrl_common.c 22 Nov 2004 19:31:30 -0000 1.43
+++ client/mapctrl_common.c 19 Dec 2004 12:14:31 -0000
@@ -709,7 +709,7 @@
/****************************************************************************
Fill and sort the list of units on the tile.
****************************************************************************/
-void fill_tile_unit_list(struct tile *ptile, struct unit **unit_list)
+void fill_tile_unit_list(const struct tile *ptile, struct unit **unit_list)
{
int i = 0;
Index: client/mapctrl_common.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/mapctrl_common.h,v
retrieving revision 1.19
diff -u -r1.19 mapctrl_common.h
--- client/mapctrl_common.h 29 Sep 2004 02:24:19 -0000 1.19
+++ client/mapctrl_common.h 19 Dec 2004 12:14:31 -0000
@@ -60,7 +60,7 @@
bool get_chance_to_win(int *att_chance, int *def_chance,
struct tile *ptile);
-void fill_tile_unit_list(struct tile *ptile, struct unit **unit_list);
+void fill_tile_unit_list(const struct tile *ptile, struct unit **unit_list);
extern struct city *city_workers_display;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] Re: (PR#11604) Sprinkling some more consts,
Frédéric Brière <=
|
|