[Commits] [wesnoth/wesnoth] 574fd0: Call display method instead of game_display if lat...

GitHub noreply at github.com
Mon Feb 5 16:07:49 UTC 2018


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 574fd0ec4bb119325c26c9a75e3459008c75ad6d
      https://github.com/wesnoth/wesnoth/commit/574fd0ec4bb119325c26c9a75e3459008c75ad6d
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2018-02-06 (Tue, 06 Feb 2018)

  Changed paths:
    M src/actions/advancement.cpp
    M src/actions/attack.cpp
    M src/actions/create.cpp
    M src/actions/heal.cpp
    M src/actions/move.cpp
    M src/actions/unit_creator.cpp
    M src/actions/vision.cpp
    M src/ai/contexts.cpp
    M src/ai/default/recruitment.cpp
    M src/editor/action/action_item.cpp
    M src/editor/action/action_unit.cpp
    M src/game_events/action_wml.cpp
    M src/gui/dialogs/label_settings.cpp
    M src/pathfind/pathfind.cpp
    M src/playturn.cpp
    M src/preferences/display.cpp
    M src/replay.cpp
    M src/synced_commands.cpp
    M src/synced_user_choice.cpp
    M src/units/animation.cpp
    M src/units/frame.cpp
    M src/whiteboard/attack.cpp
    M src/whiteboard/highlighter.cpp
    M src/whiteboard/manager.cpp
    M src/whiteboard/move.cpp
    M src/whiteboard/recall.cpp
    M src/whiteboard/recruit.cpp
    M src/whiteboard/side_actions.cpp
    M src/whiteboard/suppose_dead.cpp
    M src/whiteboard/utility.cpp

  Log Message:
  -----------
  Call display method instead of game_display if latter doesn't override

The proliferation of game_display::get_singleton() was due to 786233d5c95913889d6f061f3749f80a5efd61c1
where I replaced resources::screen (itself a game_display* pointer) with the game_display singleton.

Using the game_display pointer has already caused one case of UB (issue #2447), so I figured it best to
call the base class pointer in all cases where a game_display-specific function or override was not used.





More information about the Commits mailing list