[freeciv-data] Re: [Freeciv-Dev] (PR#2609) PATCH: clean up unit_upgrade_
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Thu, 19 Dec 2002, Guest via RT wrote:
> [glip - Thu Dec 19 10:43:13 2002]:
>
> > On Thu, 19 Dec 2002, Guest via RT wrote:
> >
> > > This patch cleans up the function unit_upgrade_price.
> >
> > Style issues:
> > function declarations should not be split,
>
> I assume that you mean the linewrapping. I had to wrap it to obey the
> rule about line length. But it would indeed fit on a single line
> without the unused parameter pplayer. I could remove it, but then I
> would have to change the calls (in around 12 places). Should I do
> that?
What I meant is that
int unit_upgrade_price(const struct player * const pplayer,
const Unit_Type_id from, const Unit_Type_id to);
or
int unit_upgrade_price(const struct player * const pplayer,
const Unit_Type_id from,
const Unit_Type_id to);
are OK and this
int unit_upgrade_price
(const struct player * const pplayer,
const Unit_Type_id from, const Unit_Type_id to);
isn't. Not that it is explicitly mentioned in the style guide, but
most of the code follows that.
Removing an unused parameter should be considered. Arguments for keeping
it might include compliance to a pattern established by similar functions
or future extensibility.
> > blank line after variables etc.
>
> I can change that.
Cool.
G.
|
|