[Freeciv-Dev] Re: (PR#8569) num_player_dlg_columns value
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=8569 >
On Thu, 22 Apr 2004, Vasco Alexandre da Silva Costa wrote:
>
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=8569 >
>
> On Wed, 21 Apr 2004, Jason Short wrote:
>
> >
> > <URL: http://rt.freeciv.org/Ticket/Display.html?id=8569 >
> >
> > freeciv@xxxxxxxxxxxxxxxxxxx wrote:
> > > This is an automated notification of a change to freeciv cvs,
> > > on Wed Apr 21 19:15:38 PDT 2004 = Thu Apr 22 02:15:38 2004 (GMT)
> > > by Vasco Alexandre da Silva Costa <vasc@xxxxxxxxxxxxxxx>
> > >
> > > ---- Files affected:
> > >
> > > freeciv/client plrdlg_common.c plrdlg_common.h options.c
> > > freeciv/client/gui-gtk-2.0 plrdlg.c
> > >
> > > ---- Log message:
> > > Tag: HEAD
> > >
> > > Replaced NUM_PLAYER_DLG_COLUMNS constant with num_player_dlg_columns
> > > variable.
> >
> > This value would be better as a const.
> >
> > In the city report I once tried doing the same thing. However that
> > value is used in the declaration of some global arrays, so it can't be a
> > variable. It's possible this will happen to the playerdlg value as well.
>
> I do not see that happenning now, nor why it should happen anyday.
> Besides, options.c does the same thing. What I suppose I could do is put
> NUM_PLAYER_DLG_COLUMNS back but defined like this:
>
> #define NUM_PLAYER_DLG_COLUMNS ARRAY_SIZE(player_dlg_columns)
>
> Would this be satisfactory?
On second thoughts, this won't work because only the file with the array
declaration knows the real size. If we hide it in player_dlg_common.c
plrdlg.c will not know the real size.
---
Vasco Alexandre da Silva Costa @ Instituto Superior Tecnico, Lisboa
|
|