[wesnoth-commits] [wesnoth/wesnoth] 33e160: refactor battle_context

GitHub noreply at github.com
Sun Oct 7 11:52:28 UTC 2018


  Branch: refs/heads/1.14
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 33e1601c9e76d9ebcec2a9371baef889646db4ad
      https://github.com/wesnoth/wesnoth/commit/33e1601c9e76d9ebcec2a9371baef889646db4ad
  Author: gfgtdf <daniel.gfgtdf at gmail.com>
  Date:   2018-10-07 (Sun, 07 Oct 2018)

  Changed paths:
    M src/actions/attack.cpp
    M src/actions/attack.hpp
    M src/gui/dialogs/unit_attack.cpp
    M src/gui/dialogs/unit_attack.hpp
    M src/mouse_events.cpp
    M src/reports.cpp

  Log Message:
  -----------
  refactor battle_context

this has multiple advantages:;
1) it fixes #3594, an assertion failue that happend when a unit with
only one attack attacked when that one attack was disabled.
2) It now creates each pair or battle_context_unit_stats only once for
each pauir of attacks, previsouly the coud would create multiple
temporary battle_context_unit_stats objects to for exampel check
"disabled"
3) It simplifies the code by removing special handling of some cases.


  Commit: 1e36906ad197579f9d251f651cade4284fe7028f
      https://github.com/wesnoth/wesnoth/commit/1e36906ad197579f9d251f651cade4284fe7028f
  Author: gfgtdf <daniel.gfgtdf at gmail.com>
  Date:   2018-10-07 (Sun, 07 Oct 2018)

  Changed paths:
    M src/actions/attack.cpp
    M src/actions/attack.hpp

  Log Message:
  -----------
  remove unused cctors


  Commit: 189df969b5f76e3fd71ab2fb209a399cd9507b11
      https://github.com/wesnoth/wesnoth/commit/189df969b5f76e3fd71ab2fb209a399cd9507b11
  Author: gfgtdf <daniel.gfgtdf at gmail.com>
  Date:   2018-10-07 (Sun, 07 Oct 2018)

  Changed paths:
    M src/actions/attack.cpp

  Log Message:
  -----------
  add debug info in battle_context


Compare: https://github.com/wesnoth/wesnoth/compare/07fad7a7b552...189df969b5f7
      **NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.


More information about the Commits mailing list