Follow-up Comment #15, patch #1020 (project wesnoth):

2) done.

3) warning sent to engine log

4) done.


1) So, delete_all() now clears it.

Biggest change in this one: added iterator counting... map clears itself when
there are no iterator instances and when there are more invalid than valid
entries... i think that maybe changing that to something like more than some
% (say 10) invalid.

Adding the iterator counting does add a bit of complexity to the class. The
trade off is that without it (or some other similar method), we would either
not cull out invalid entries ever, or we would require that an explicit call
to clean_invalid() was made somewhere that we know that no iterator instances
exist.

I think it may be better to keep that internal management inside the class
though.

(file #4046)
    _______________________________________________________

Additional Item Attachment:

File name: unit_map_final1.patch          Size:25 KB


    _______________________________________________________

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