[Commits] [wesnoth/wesnoth] 69cd66: Editor: cleaned up a bunch of accessors

GitHub noreply at github.com
Sun Jan 28 14:44:24 UTC 2018


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 69cd6640d03e367a036b6a0fbb9c42a39ebaefce
      https://github.com/wesnoth/wesnoth/commit/69cd6640d03e367a036b6a0fbb9c42a39ebaefce
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2018-01-29 (Mon, 29 Jan 2018)

  Changed paths:
    M src/editor/action/action.cpp
    M src/editor/action/action_item.cpp
    M src/editor/action/action_select.cpp
    M src/editor/action/action_unit.cpp
    M src/editor/action/action_village.cpp
    M src/editor/controller/editor_controller.cpp
    M src/editor/map/context_manager.cpp
    M src/editor/map/context_manager.hpp
    M src/editor/map/map_context.cpp
    M src/editor/map/map_context.hpp

  Log Message:
  -----------
  Editor: cleaned up a bunch of accessors

Map Context:
* Removed get_team() in favor of non-const local team() overload.
* Removeded get_map() (both overloads) in favor of map() and a local non-const overload of the same.
* Made both overloads of map() return editor_map instead of gamemap (former inherits from the latter).

Context Manager:
* Removed team, unit, and label accessors that only fetched the same info from the current map_context.
  Having more functions of this name only made things a lot more confusing.

Editor Controller:
* Change all instances of the three intermediate accessors mentioned above to data queries directly
  from the current map context via editor_controller::get_current_map_context. The result is the same,
  we just no longer have three levels of indirection.


  Commit: 99051100a4d4b935e5c431645e2b98d0e647baaf
      https://github.com/wesnoth/wesnoth/commit/99051100a4d4b935e5c431645e2b98d0e647baaf
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2018-01-29 (Mon, 29 Jan 2018)

  Changed paths:
    M src/play_controller.cpp

  Log Message:
  -----------
  Revert 229b9be7eb59 and re-add with comment


Compare: https://github.com/wesnoth/wesnoth/compare/b0bb9d94f0a8...99051100a4d4


More information about the Commits mailing list