URL: <http://gna.org/patch/?3868>
Summary: Refactor unleash_barbarians() terrain analysis loop Project: Freeciv Submitted by: persia Submitted on: Mon 22 Apr 2013 09:27:29 AM JST Category: general Priority: 5 - Normal Status: None Privacy: Public Assigned to: None Originator Email: Open/Closed: Open Discussion Lock: Any Planned Release: _______________________________________________________ Details: Avoid calling is_ocean() and is_non_allied_terrain() twice separately for is_free_land() and is_free_sea(). Instead, drop the helper functions, and consolidate the logic in the terrain analysis loop, with a short-circuit to never call is_ocean() when is_non_allied_terrain(). _______________________________________________________ File Attachments: ------------------------------------------------------- Date: Mon 22 Apr 2013 09:27:29 AM JST Name: refactor-unleash_barbarians.patch Size: 3kB By: persia <http://gna.org/patch/download.php?file_id=17800> _______________________________________________________ Reply to this item at: <http://gna.org/patch/?3868> _______________________________________________ Message sent via/by Gna! http://gna.org/ _______________________________________________ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev