[Commits] [wesnoth/wesnoth] 29f883: cleanup check_victory in ai actions

GitHub noreply at github.com
Sun May 25 19:50:14 UTC 2014


  Branch: refs/heads/1.12
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 29f8834ab72d4675722e6412e25b04d25d5324a8
      https://github.com/wesnoth/wesnoth/commit/29f8834ab72d4675722e6412e25b04d25d5324a8
  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: 65c3c1c18dc0177253d27fd4ae3a8efea1f9d0d4
      https://github.com/wesnoth/wesnoth/commit/65c3c1c18dc0177253d27fd4ae3a8efea1f9d0d4
  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/97fd0f794be7...65c3c1c18dc0


More information about the Commits mailing list