mirror of
https://github.com/oliverbooth/X10D
synced 2024-11-10 04:55:42 +00:00
Swap via deconstruction
This commit is contained in:
parent
a73ec546d1
commit
a8087771c8
@ -53,9 +53,7 @@ namespace X10D
|
||||
while (count > 0)
|
||||
{
|
||||
int index = random.Next(count--);
|
||||
var temp = source[count];
|
||||
source[count] = source[index];
|
||||
source[index] = temp;
|
||||
(source[count], source[index]) = (source[index], source[count]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user