Skip to content

Commit

Permalink
Out-of-line some functions to remove an include
Browse files Browse the repository at this point in the history
  • Loading branch information
AI0867 authored and GregoryLundberg committed Nov 30, 2017
1 parent e7a055e commit 9396f93
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
16 changes: 16 additions & 0 deletions src/actions/undo_recall_action.cpp
Expand Up @@ -20,6 +20,7 @@
#include "team.hpp"
#include "replay.hpp"
#include "units/map.hpp"
#include "units/unit.hpp"
#include "statistics.hpp"
#include "log.hpp"
#include "game_display.hpp"
Expand All @@ -33,6 +34,21 @@ namespace actions
namespace undo
{

recall_action::recall_action(const unit_const_ptr recalled, const map_location& loc,
const map_location& from, int orig_village_owner, bool time_bonus)
: undo_action()
, shroud_clearing_action(recalled, loc, orig_village_owner, time_bonus)
, id(recalled->id())
, recall_from(from)
{}

recall_action::recall_action(const config & cfg, const map_location & from)
: undo_action(cfg)
, shroud_clearing_action(cfg)
, id(cfg["id"])
, recall_from(from)
{}

/**
* Writes this into the provided config.
*/
Expand Down
16 changes: 2 additions & 14 deletions src/actions/undo_recall_action.hpp
Expand Up @@ -16,7 +16,6 @@
#include "undo_action.hpp"
#include "shroud_clearing_action.hpp"
#include "units/ptr.hpp"
#include "units/unit.hpp"

namespace actions
{
Expand All @@ -31,19 +30,8 @@ struct recall_action : undo_action, shroud_clearing_action


recall_action(const unit_const_ptr recalled, const map_location& loc,
const map_location& from, int orig_village_owner, bool time_bonus)
: undo_action()
, shroud_clearing_action(recalled, loc, orig_village_owner, time_bonus)
, id(recalled->id())
, recall_from(from)
{
}
recall_action(const config & cfg, const map_location & from)
: undo_action(cfg)
, shroud_clearing_action(cfg)
, id(cfg["id"])
, recall_from(from)
{}
const map_location& from, int orig_village_owner, bool time_bonus);
recall_action(const config & cfg, const map_location & from);
virtual const char* get_type() const { return "recall"; }
virtual ~recall_action() {}

Expand Down

0 comments on commit 9396f93

Please sign in to comment.