Actions/Undo: use nested namespace declarations
This commit is contained in:
parent
5e4728d69e
commit
672b33f227
10 changed files with 10 additions and 53 deletions
|
@ -18,9 +18,7 @@
|
|||
#include "team.hpp"
|
||||
#include "units/unit.hpp"
|
||||
|
||||
namespace actions
|
||||
{
|
||||
namespace undo
|
||||
namespace actions::undo
|
||||
{
|
||||
dismiss_action::dismiss_action(const unit_const_ptr dismissed)
|
||||
: undo_action()
|
||||
|
@ -57,4 +55,3 @@ bool dismiss_action::undo(int side)
|
|||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,11 +16,8 @@
|
|||
|
||||
#include "undo_action.hpp"
|
||||
|
||||
namespace actions
|
||||
namespace actions::undo
|
||||
{
|
||||
namespace undo
|
||||
{
|
||||
|
||||
struct dismiss_action : undo_action
|
||||
{
|
||||
unit_ptr dismissed_unit;
|
||||
|
@ -39,4 +36,3 @@ struct dismiss_action : undo_action
|
|||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,11 +27,8 @@ static lg::log_domain log_engine("engine");
|
|||
#define ERR_NG LOG_STREAM(err, log_engine)
|
||||
#define LOG_NG LOG_STREAM(info, log_engine)
|
||||
|
||||
namespace actions
|
||||
namespace actions::undo
|
||||
{
|
||||
namespace undo
|
||||
{
|
||||
|
||||
move_action::move_action(const unit_const_ptr moved,
|
||||
const std::vector<map_location>::const_iterator & begin,
|
||||
const std::vector<map_location>::const_iterator & end,
|
||||
|
@ -130,6 +127,4 @@ bool move_action::undo(int)
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,11 +18,8 @@
|
|||
#include "shroud_clearing_action.hpp"
|
||||
#include "units/ptr.hpp"
|
||||
|
||||
namespace actions
|
||||
namespace actions::undo
|
||||
{
|
||||
namespace undo
|
||||
{
|
||||
|
||||
struct move_action : undo_action, shroud_clearing_action
|
||||
{
|
||||
int starting_moves;
|
||||
|
@ -55,4 +52,3 @@ struct move_action : undo_action, shroud_clearing_action
|
|||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,11 +30,8 @@ static lg::log_domain log_engine("engine");
|
|||
#define ERR_NG LOG_STREAM(err, log_engine)
|
||||
#define LOG_NG LOG_STREAM(info, log_engine)
|
||||
|
||||
namespace actions
|
||||
namespace actions::undo
|
||||
{
|
||||
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()
|
||||
|
@ -106,4 +103,3 @@ bool recall_action::undo(int side)
|
|||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,12 +18,8 @@
|
|||
#include "shroud_clearing_action.hpp"
|
||||
#include "units/ptr.hpp"
|
||||
|
||||
namespace actions
|
||||
namespace actions::undo
|
||||
{
|
||||
namespace undo
|
||||
{
|
||||
|
||||
|
||||
struct recall_action : undo_action, shroud_clearing_action
|
||||
{
|
||||
std::string id;
|
||||
|
@ -44,4 +40,3 @@ struct recall_action : undo_action, shroud_clearing_action
|
|||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,11 +29,8 @@ static lg::log_domain log_engine("engine");
|
|||
#define ERR_NG LOG_STREAM(err, log_engine)
|
||||
#define LOG_NG LOG_STREAM(info, log_engine)
|
||||
|
||||
namespace actions
|
||||
namespace actions::undo
|
||||
{
|
||||
namespace undo
|
||||
{
|
||||
|
||||
recruit_action::recruit_action(const unit_const_ptr recruited, const map_location& loc,
|
||||
const map_location& from, int orig_village_owner, bool time_bonus)
|
||||
: undo_action()
|
||||
|
@ -95,4 +92,3 @@ bool recruit_action::undo(int side)
|
|||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,11 +22,8 @@
|
|||
|
||||
class unit_type;
|
||||
|
||||
namespace actions
|
||||
namespace actions::undo
|
||||
{
|
||||
namespace undo
|
||||
{
|
||||
|
||||
struct recruit_action : undo_action, shroud_clearing_action
|
||||
{
|
||||
const unit_type & u_type;
|
||||
|
@ -47,4 +44,3 @@ struct recruit_action : undo_action, shroud_clearing_action
|
|||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,12 +14,8 @@
|
|||
|
||||
#include "actions/undo_update_shroud_action.hpp"
|
||||
|
||||
namespace actions
|
||||
namespace actions::undo
|
||||
{
|
||||
namespace undo
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* Writes this into the provided config.
|
||||
*/
|
||||
|
@ -37,6 +33,4 @@ void update_shroud_action::write(config & cfg) const
|
|||
undo_action_base::write(cfg);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,11 +16,8 @@
|
|||
|
||||
#include "undo_action.hpp"
|
||||
|
||||
namespace actions
|
||||
namespace actions::undo
|
||||
{
|
||||
namespace undo
|
||||
{
|
||||
|
||||
struct auto_shroud_action : undo_action_base {
|
||||
bool active;
|
||||
|
||||
|
@ -49,4 +46,3 @@ struct update_shroud_action : undo_action_base {
|
|||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue