Follow-up Comment #4, patch #1046 (project wesnoth): And a bit more...
It would also be possible to do this just with a multimap<location, <bool, pair<location, unit> * > > implemented basically the same. The downside to this would be that it doesn't allow fast lookup by unit_id, and I think it would be useful to add the ability to find an element by underlying id as well as by location, but I've tried not to throw too much into one patch. And you can blame sapient for all the different iterators. I basically just implemented the ones that he requested in the forum post about the unit map. You can blame me for the fact that the iterators take up most of the lines of code. _______________________________________________________ Reply to this item at: <http://gna.org/patch/?1046> _______________________________________________ Message sent via/by Gna! http://gna.org/ _______________________________________________ Wesnoth-bugs mailing list Wesnoth-bugs@gna.org https://mail.gna.org/listinfo/wesnoth-bugs