URL:
<http://gna.org/patch/?1126>
Summary: Sanitizing the config class
Project: Battle for Wesnoth
Submitted by: silene
Submitted on: lundi 23.02.2009 à 00:24
Priority: 5 - Normal
Status: In Progress
Privacy: Public
Assigned to: silene
Originator Email:
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
The long-term goal is to rewrite the config class, so that it has a smaller
memory footprint and an automatic lifetime management (e.g.
reference-counted). Unfortunately, this is currently impossible to achieve
without rewriting most of the game, as the implementation details of the
class have leaked in about every file.
So a short-term goal is to have proper iterators that hide the inner workings
of the class. The attached patch starts by changing config::child_range so
that it returns opaque forward iterators. This change gets rid of all the
related "**i.first" constructions.
Remarks: 1. The tips of the titlescreen need random iterators. 2. The
set_config function had an (innocuous) bug: it was modifying a supposedly
constant config object.
The patch is scheduled for being applied once 1.7 opens.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: lundi 23.02.2009 à 00:24 Name: child_range.patch Size: 52 ko By:
silene
<http://gna.org/patch/download.php?file_id=5336>
_______________________________________________________
Reply to this item at:
<http://gna.org/patch/?1126>
_______________________________________________
Message posté via/par Gna!
http://gna.org/
_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs