When a reference breaks things !
Here we take a reference (that is a pointer) to an
entry in a vector that changes below us --> BOOM !
References are essential but should be considered with
care in C++ because could lead to nasty surprises.
Restored functionality.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
for (i = 1; i <= n; i++)
{
- const RootMove& rm = this->at(i);
+ const RootMove rm = this->at(i);
for (j = i; j > 0 && this->at(j - 1) < rm; j--)
(*this)[j] = this->at(j - 1);