Add more assertions, throw if find_output params are invalid

This commit is contained in:
Jack Grigg
2016-10-19 08:49:08 -05:00
parent 328d39d29c
commit aa36398b27
2 changed files with 4 additions and 1 deletions

View File

@@ -43,6 +43,8 @@ void MappedShuffle(RandomAccessIterator first,
{
for (size_t i = len-1; i > 0; --i) {
auto r = gen(i+1);
assert(r >= 0);
assert(r <= i);
std::swap(first[i], first[r]);
std::swap(mapFirst[i], mapFirst[r]);
}