add an assert
This commit is contained in:
parent
541b1576c5
commit
4a1c3f7898
2 changed files with 4 additions and 1 deletions
|
@ -36,7 +36,7 @@
|
|||
#include "seed_rng.hpp"
|
||||
#include "syncmp_handler.hpp"
|
||||
#include "unit_id.hpp"
|
||||
|
||||
#include "whiteboard/manager.hpp"
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
#include <cassert>
|
||||
|
@ -364,6 +364,7 @@ set_scontext_synced_base::set_scontext_synced_base()
|
|||
, old_rng_(random_new::generator)
|
||||
{
|
||||
LOG_REPLAY << "set_scontext_synced_base::set_scontext_synced_base\n";
|
||||
assert(!resources::whiteboard->has_planned_unit_map());
|
||||
assert(synced_context::get_synced_state() == synced_context::UNSYNCED);
|
||||
synced_context::set_synced_state(synced_context::SYNCED);
|
||||
synced_context::reset_is_simultaneously();
|
||||
|
|
|
@ -631,6 +631,8 @@ unit::unit(const unit_type &u_type, int side, bool real_unit,
|
|||
, modifications_()
|
||||
, invisibility_cache_()
|
||||
{
|
||||
// read this as 'synced_context::get_synced_state() == synced_context::SYNCED => real_unit'.
|
||||
assert(real_unit || synced_context::get_synced_state() != synced_context::SYNCED);
|
||||
cfg_["upkeep"]="full";
|
||||
|
||||
// Apply the unit type's data to this unit.
|
||||
|
|
Loading…
Add table
Reference in a new issue