Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2004:
[Freeciv-Dev] Re: (PR#11478) Sprinkling some const struct player
Home

[Freeciv-Dev] Re: (PR#11478) Sprinkling some const struct player

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] Re: (PR#11478) Sprinkling some const struct player
From: "Frédéric Brière" <fbriere@xxxxxxxxxxx>
Date: Sat, 11 Dec 2004 15:13:09 -0800
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=11478 >

Here's a couple more.


-- 
             Frédéric Brière    <*>    fbriere@xxxxxxxxxxx

 =>  <fbriere@xxxxxxxxxx> IS NO MORE:  <http://www.abacomsucks.com>  <=

Index: common/diptreaty.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/diptreaty.c,v
retrieving revision 1.27
diff -u -r1.27 diptreaty.c
--- common/diptreaty.c  17 Sep 2004 08:35:14 -0000      1.27
+++ common/diptreaty.c  11 Dec 2004 22:59:23 -0000
@@ -26,7 +26,8 @@
   Returns TRUE iff pplayer could do diplomancy in the game at all.
   These values are set by player in stdinhand.c.
 **************************************************************************/
-bool diplomacy_possible(struct player *pplayer, struct player *aplayer)
+bool diplomacy_possible(const struct player *pplayer,
+                       const struct player *aplayer)
 {
   return  (game.diplomacy == 0      /* Unlimited diplomacy */
           || (game.diplomacy == 1  /* Human diplomacy only */
@@ -42,7 +43,8 @@
 /**************************************************************************
   Returns TRUE iff pplayer could do diplomatic meetings with aplayer.
 **************************************************************************/
-bool could_meet_with_player(struct player *pplayer, struct player *aplayer)
+bool could_meet_with_player(const struct player *pplayer,
+                               const struct player *aplayer)
 {
   return (pplayer->is_alive
           && aplayer->is_alive
@@ -59,7 +61,8 @@
 /**************************************************************************
   Returns TRUE iff pplayer could do diplomatic meetings with aplayer.
 **************************************************************************/
-bool could_intel_with_player(struct player *pplayer, struct player *aplayer)
+bool could_intel_with_player(const struct player *pplayer,
+                               const struct player *aplayer)
 {
   return (pplayer->is_alive
           && aplayer->is_alive
Index: common/diptreaty.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/diptreaty.h,v
retrieving revision 1.16
diff -u -r1.16 diptreaty.h
--- common/diptreaty.h  14 Jul 2004 19:12:27 -0000      1.16
+++ common/diptreaty.h  11 Dec 2004 22:59:23 -0000
@@ -46,9 +46,12 @@
   struct clause_list clauses;
 };
 
-bool diplomacy_possible(struct player *pplayer, struct player *aplayer);
-bool could_meet_with_player(struct player *pplayer, struct player *aplayer);
-bool could_intel_with_player(struct player *pplayer, struct player *aplayer);
+bool diplomacy_possible(const struct player *pplayer,
+                       const struct player *aplayer);
+bool could_meet_with_player(const struct player *pplayer,
+                               const struct player *aplayer);
+bool could_intel_with_player(const struct player *pplayer,
+                               const struct player *aplayer);
 
 void init_treaty(struct Treaty *ptreaty, 
                 struct player *plr0, struct player *plr1);
Index: client/civclient.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/civclient.c,v
retrieving revision 1.209
diff -u -r1.209 civclient.c
--- client/civclient.c  1 Dec 2004 22:15:22 -0000       1.209
+++ client/civclient.c  11 Dec 2004 22:59:23 -0000
@@ -661,7 +661,7 @@
   Returns TRUE iff the client can do diplomatic meetings with another 
   given player.
 **************************************************************************/
-bool can_meet_with_player(struct player *pplayer)
+bool can_meet_with_player(const struct player *pplayer)
 {
   return (could_meet_with_player(game.player_ptr, pplayer)
           && can_client_issue_orders());
@@ -671,7 +671,7 @@
   Returns TRUE iff the client can get intelligence from another 
   given player.
 **************************************************************************/
-bool can_intel_with_player(struct player *pplayer)
+bool can_intel_with_player(const struct player *pplayer)
 {
   return could_intel_with_player(game.player_ptr, pplayer);
 }
Index: client/civclient.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/civclient.h,v
retrieving revision 1.37
diff -u -r1.37 civclient.h
--- client/civclient.h  1 Dec 2004 22:15:22 -0000       1.37
+++ client/civclient.h  11 Dec 2004 22:59:23 -0000
@@ -59,8 +59,8 @@
 void real_timer_callback(void);
 bool can_client_issue_orders(void);
 bool can_client_change_view(void);
-bool can_meet_with_player(struct player *pplayer);
-bool can_intel_with_player(struct player *pplayer);
+bool can_meet_with_player(const struct player *pplayer);
+bool can_intel_with_player(const struct player *pplayer);
 
 void client_game_init(void);
 void client_game_free(void);

[Prev in Thread] Current Thread [Next in Thread]