[wesnoth-commits] [wesnoth/wesnoth] 96f69a: Don't assume unit is on the map when testing abili...

GitHub noreply at github.com
Sun Mar 4 19:31:28 UTC 2018


  Branch: refs/heads/fix_2247
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 96f69a34ba1370bb948bddc4a97e54134190ba5d
      https://github.com/wesnoth/wesnoth/commit/96f69a34ba1370bb948bddc4a97e54134190ba5d
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2018-03-04 (Sun, 04 Mar 2018)

  Changed paths:
    M src/actions/attack.cpp
    M src/gui/dialogs/attack_predictions.cpp
    M src/reports.cpp
    M src/units/abilities.cpp
    M src/units/attack_type.hpp

  Log Message:
  -----------
  Don't assume unit is on the map when testing ability active

This refactors ability tests to use a passed-in unit instead of
searching for the unit on the map based on its location.

While it does fix #2247, I am not confident that this won't also
have some undesirable side-effects.


  Commit: 6b4aef9b751701eb7ed7516e6a800c32527337db
      https://github.com/wesnoth/wesnoth/commit/6b4aef9b751701eb7ed7516e6a800c32527337db
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2018-03-04 (Sun, 04 Mar 2018)

  Changed paths:
    M src/units/abilities.cpp
    M src/units/attack_type.hpp

  Log Message:
  -----------
  Don't construct an intrusive pointer from a raw pointer

@gfgtdf is worried about the possibility of this code being called from a unit's constructor, which would create problems.


Compare: https://github.com/wesnoth/wesnoth/compare/9556d2b1e4e3...6b4aef9b7517


More information about the Commits mailing list