Follow-up Comment #3, bug #13268 (project wesnoth):

OK, a few remarks:

1.
delete_recall_unit::button_pressed clears the complete redo_stack. I'd rather
erase the last element instead. Or is there another reason for that?

2.
It looks like the logic for undo and redo is switched. Undo should call
recall_list.erase and redo should call recall_list.insert.

3.
The design of undo_action is pretty much a mess (well, it was that way before
you touched it, too). At least you should find another name for recall_loc and
recall_pos, as the names are misleading. I'd even go a step further, introduce
an enum for the action and let go of the bool member variables (you can keep
the getters to provide the same interface). As this is not necessary for
fixing the bug itself, i'd do that separately after applying the patch.

4.
The second comment should read "redo a dismissal" ;-)

    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?13268>

_______________________________________________
  Nachricht geschickt von/durch Gna!
  http://gna.org/


_______________________________________________
Wesnoth-bugs mailing list
Wesnoth-bugs@gna.org
https://mail.gna.org/listinfo/wesnoth-bugs

Reply via email to