Whiteboard/move: rename a variable,

...and extra trace to try and detect a bug under msvc 9.
This commit is contained in:
Gabriel Morin 2010-10-11 01:59:04 +00:00
parent 9744d8bacd
commit 2a01d5e0f1

View file

@ -101,15 +101,19 @@ move::~move()
if (resources::teams)
{
side_actions_ptr side_actions = resources::teams->at(team_index()).get_side_actions();
side_actions::iterator action = side_actions->find_last_action_of(unit_);
if (action != side_actions->end())
LOG_WB << "Entering ~move, side_actions size is " << side_actions->size() << "\n";
side_actions::iterator action_it = side_actions->find_last_action_of(unit_);
if (action_it != side_actions->end())
{
if (move_ptr move = boost::dynamic_pointer_cast<class move>(*action))
if (move_ptr move = boost::dynamic_pointer_cast<class move>(*action_it))
{
if (move->fake_unit_)
move->fake_unit_->set_ghosted(true);
}
}
}
//reminder: here we rely on the ~arrow destructor to invalidate