[Commits] [wesnoth/wesnoth] 9f399d: cleanup check_victory in ai actions

GitHub noreply at github.com
Sun May 25 19:57:02 UTC 2014


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 9f399d89797bade77f466f5ac89bd841bb7589f7
      https://github.com/wesnoth/wesnoth/commit/9f399d89797bade77f466f5ac89bd841bb7589f7
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2014-05-25 (Sun, 25 May 2014)

  Changed paths:
    M src/ai/actions.cpp
    M src/playsingle_controller.cpp

  Log Message:
  -----------
  cleanup check_victory in ai actions

do_execute which calls run_in_synced_context can throw end_level
exception because run_in_synced context calls check_victory. So we don't
need the additional check_victory in action_result::execute anymore.


  Commit: d1d70cb7b1ed02b9888d21f0008edd51d7ba57d4
      https://github.com/wesnoth/wesnoth/commit/d1d70cb7b1ed02b9888d21f0008edd51d7ba57d4
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2014-05-25 (Sun, 25 May 2014)

  Changed paths:
    M src/playmp_controller.cpp
    M src/playsingle_controller.cpp

  Log Message:
  -----------
  remove check_victory in play_human_turn

we don't need these because we call check_victory at the end of the
synced_context.

I removed them because check_victory assumes that "this code is run
rarely" which is not the case if we call it there.


Compare: https://github.com/wesnoth/wesnoth/compare/684d1c35c64e...d1d70cb7b1ed


More information about the Commits mailing list