URL:
  <http://gna.org/patch/?1020>

                 Summary: unit_map::unit_iterator
                 Project: Battle for Wesnoth
            Submitted by: cjhopman
            Submitted on: Saturday 03/22/2008 at 20:20
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

added a revision_number field to unit_map and to unit_map::iterator and
const_iterator. new iterator method valid() checks if revision numbers
match.


created a new iterator for the unit map

unit_map::unit_iterator

changes to the underlying map will not invalidate the iterator, and it will
iterate over every unit that was in the map when the iterator was created. if
it gets to a unit that is no longer in the map it skips that unit. 


modified formulaAI code for unit formulas to use the unit_iterator, see there
for usage



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Saturday 03/22/2008 at 20:20  Name: unit_map_unit_iterator.patch  Size:
11kB   By: cjhopman

<http://gna.org/patch/download.php?file_id=4027>

    _______________________________________________________

Reply to this item at:

  <http://gna.org/patch/?1020>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs

Reply via email to