[repacker] Clear distance and position cache when assigning a new space.

A change in space will effect the distance assigned to the node and any of it's children so clear the distance cache.
This commit is contained in:
Garret Rieger 2021-12-10 10:05:47 -08:00 committed by Behdad Esfahbod
parent 706014f69d
commit 5914acb3cb
1 changed files with 2 additions and 0 deletions

View File

@ -742,6 +742,8 @@ struct graph_t
num_roots_for_space_[node.space] = num_roots_for_space_[node.space] - 1;
num_roots_for_space_[new_space] = num_roots_for_space_[new_space] + 1;
node.space = new_space;
distance_invalid = true;
positions_invalid = true;
}
}