Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2002:
[Freeciv-Dev] (PR#2566) PATCH: clean up handle_upgrade_unittype_request
Home

[Freeciv-Dev] (PR#2566) PATCH: clean up handle_upgrade_unittype_request

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Erik.Sigra@xxxxxxxxxxxxxx
Cc: freeciv@xxxxxxx, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#2566) PATCH: clean up handle_upgrade_unittype_request
From: "Jason Short via RT" <rt@xxxxxxxxxxxxxx>
Date: Thu, 19 Dec 2002 10:58:37 -0800
Reply-to: rt@xxxxxxxxxxxxxx

[guest - Thu Dec 19 09:41:16 2002]:

> OK. Here is a patch with that 'const' qualifier removed. 

Upon further review, I don't think it's appropriate to pass the unittype
directly.  This function should take the packet struct, just like all
the other handle_xxx functions do.  In general, this is because if the
packet changes more data will be needed by the function.


Another small style issue: I agree with Greg about the function
wrapping.  I would never use

void handle_upgrade_unittype_request
(struct player * const pplayer, const Unit_Type_id from_unittype);

(but this is trivial since it is easy for the patch committer to change it.)

jason




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