URL:
<http://gna.org/patch/?3195>
Summary: Remove #define MAX_MAP_AREA
Project: Battle for Wesnoth
Submitted by: jamit
Submitted on: Tue 20 Mar 2012 06:41:35 PM EDT
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
This patch replaces MAX_MAP_AREA (a #define'd constant) with
game_config::max_loop (a type-safe constant). There was only one place where
MAX_MAP_AREA was used (as a default value), and there were a couple of places
where game_config::max_loop was used as sort of an alternate default value.
More to the point, perhaps, is that both MAX_MAP_AREA and
game_config::max_loop were given the same value. Overall, it looks like
max_loop was intended to serve the same purpose as MAX_MAP_AREA and is
type-safe.
In addition, this patch gets rid of the now fully-redundant calls to
terrain_filter::restrict_size(). (Should mention: the place the constant was
used is in a constructor of the terrain_filter class.)
Interestingly, even though MAX_MAP_AREA was only used once, it was #define'd
twice.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Tue 20 Mar 2012 06:41:35 PM EDT Name: max_map_area.diff Size: 3kB
By: jamit
Converts a #define to a const size_t
<http://gna.org/patch/download.php?file_id=15388>
_______________________________________________________
Reply to this item at:
<http://gna.org/patch/?3195>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs