Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2001:
[Freeciv-Dev] [Patch] Cleanup regarding {city,unit}_owner
Home

[Freeciv-Dev] [Patch] Cleanup regarding {city,unit}_owner

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] [Patch] Cleanup regarding {city,unit}_owner
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 23 Aug 2001 23:27:03 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

The first patch changes constructs like "get_player(punit->owner)" to
"unit_owner(punit)". The second patch changes constructs like
"&game.players[punit->owner]" also to "unit_owner(punit)".

I was creating changes for the removal of 

const struct player_diplstate *player_get_diplstate(const int player,
                                                    const int player2);
int players_at_war(const int player, const int player2);
int players_allied(const int player, const int player2);
int players_non_attack(const int player, const int player2);

and it turns out the resulting patch gets really big. Bigger than my
own limit of 500 lines. So I stopped and at first just made the also
obvious changes above.

Note: the second patch isn't complete. It collides with the generic
city refresh which I would want to bring in first.

Does anybody sees problems with the cleanup? If not I will apply these
after the generic city refresh gets into the CVS.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 1 + 1 = 3, for large values of 1

Attachment: cleanup1.diff
Description: Text document

Attachment: cleanup2.diff
Description: Text document


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