URL:
http://gna.org/patch/?4883
Summary: players_iterate() optimize
Project: Freeciv
Submitted by: cazfi
Submitted on: Tue 01 Jul 2014 03:36:15 AM EEST
Category: general
Priority: 5 - Normal
Status: Ready For Test
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Planned Release: 2.4.3, 2.5.0, 2.6.0
___
Details:
Call to player_slot_is_used() every round of players_iterate() is just
unnecessary overhead (function call). It would just check (every round!) that
system is already initialized and then check that player for the slot is not
NULL. player_slots_iterate() already checked (once) that system is initialized
and we can very well check if the player returned by final
player_slot_get_player() is NULL.
Patch to remove player_slot_is_used() call from players_iterate() attached.
___
File Attachments:
---
Date: Tue 01 Jul 2014 03:36:15 AM EEST Name: PlayersIterateOptimize.patch
Size: 1kB By: cazfi
http://gna.org/patch/download.php?file_id=21226
___
Reply to this item at:
http://gna.org/patch/?4883
___
Message sent via/by Gna!
http://gna.org/
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev