URL:
<http://gna.org/patch/?3876>
Summary: Remove redundant tile_remove_base() call
Project: Freeciv
Submitted by: persia
Submitted on: Tue 23 Apr 2013 06:54:53 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:
Extracted from discussion in patch #3826
tile.c:tile_change_terrain() checks if fc_funcs->destroy_base is set, and
either calls the callback or calls tile_remove_base() if the callback is
unset. Then, just to make sure, tile_remove_base() is called again.
fc_funcs->destroy_base is set to NULL for the client and
maphand.c:destroy_base() for the server, which function also calls
tile_remove_base().
In practice, this means that for calls from the client, tile_remove_base() is
called twice in immediate succession within tile_change_terrain(), and for
calls from the server, tile_remove_base() is called from destroy_base() and
then immediately thereafter from tile_change_terrain().
This patch removes the redundant call and adds a comment indicating that the
code assumes that tile_remove_base() will be called by any function assigned
to fc_funcs->destroy_base().
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Tue 23 Apr 2013 06:54:53 AM JST Name:
remove-redundant-tile_remove_base-call.patch Size: 880B By: persia
<http://gna.org/patch/download.php?file_id=17810>
_______________________________________________________
Reply to this item at:
<http://gna.org/patch/?3876>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev