[Commits] [wesnoth/wesnoth] a4b194: add recall list manager
GitHub
noreply at github.com
Wed Jun 18 17:54:29 UTC 2014
Branch: refs/heads/master
Home: https://github.com/wesnoth/wesnoth
Commit: a4b194c0794d360dc6eff5c464c6634941dff5da
https://github.com/wesnoth/wesnoth/commit/a4b194c0794d360dc6eff5c464c6634941dff5da
Author: Chris Beck <render787 at gmail.com>
Date: 2014-06-18 (Wed, 18 Jun 2014)
Changed paths:
M projectfiles/CodeBlocks-SCons/wesnoth.cbp
M projectfiles/CodeBlocks/wesnoth.cbp
M projectfiles/VC9/wesnoth.vcproj
M src/CMakeLists.txt
M src/SConscript
M src/actions/create.cpp
M src/actions/undo.cpp
M src/ai/actions.cpp
M src/ai/contexts.cpp
M src/ai/default/ai.cpp
M src/dialogs.cpp
M src/game_board.cpp
M src/game_events/action_wml.cpp
M src/game_events/conditional_wml.cpp
M src/gamestatus.cpp
M src/gui/dialogs/gamestate_inspector.cpp
A src/recall_list_manager.cpp
A src/recall_list_manager.hpp
M src/scripting/lua.cpp
M src/scripting/lua_api.cpp
M src/side_filter.cpp
M src/synced_commands.cpp
M src/team.hpp
M src/unit.cpp
M src/whiteboard/recall.cpp
Log Message:
-----------
add recall list manager
This commit adds a dedicated recall list manager class.
The purpose of this is to
- Simplify the code that interacts with the recall list. Prior to
the commit most such code was based on iteration with explicit
iterators, and called global helper functions implemented in
unit.cpp to wrap the code that finds a unit in a vector. It turns
out that interacting with the recall list was the *only* use of
that code, so we make it a member function of the recall list
manager and take it out of unit.cpp.
Most of the code that touches the recall list was previously
7 or 8 lines with a for loop, now it tends to be 1 or 2 lines,
although further refactor may be possible.
- Improve encapsulation. This makes it possible to track how
other classes are interacting with the recall list, and may
make it easier to debug recall list problems by adding debugging
output to the class.
Commit: c3ad891fba57e1c8bd5db0e40e9bcf3c83ef597b
https://github.com/wesnoth/wesnoth/commit/c3ad891fba57e1c8bd5db0e40e9bcf3c83ef597b
Author: Chris Beck <beck.ct at gmail.com>
Date: 2014-06-18 (Wed, 18 Jun 2014)
Changed paths:
M projectfiles/CodeBlocks-SCons/wesnoth.cbp
M projectfiles/CodeBlocks/wesnoth.cbp
M projectfiles/VC9/wesnoth.vcproj
M src/CMakeLists.txt
M src/SConscript
M src/actions/create.cpp
M src/actions/undo.cpp
M src/ai/actions.cpp
M src/ai/contexts.cpp
M src/ai/default/ai.cpp
M src/dialogs.cpp
M src/game_board.cpp
M src/game_events/action_wml.cpp
M src/game_events/conditional_wml.cpp
M src/gamestatus.cpp
M src/gui/dialogs/gamestate_inspector.cpp
A src/recall_list_manager.cpp
A src/recall_list_manager.hpp
M src/scripting/lua.cpp
M src/scripting/lua_api.cpp
M src/side_filter.cpp
M src/synced_commands.cpp
M src/team.hpp
M src/unit.cpp
M src/whiteboard/recall.cpp
Log Message:
-----------
Merge pull request #208 from cbeck88/add_recall_list_mgr
add recall list manager
Compare: https://github.com/wesnoth/wesnoth/compare/12515a646679...c3ad891fba57
More information about the Commits
mailing list