fix style

This commit is contained in:
g-arslan 2020-05-21 14:39:40 +03:00
parent b88d0dec1c
commit 3267eaa498
2 changed files with 9 additions and 5 deletions

View File

@ -125,15 +125,18 @@ namespace
}
template <typename T>
void shiftArrayRight(T& arr, size_t bound)
void shiftArrayRight(T & arr, size_t bound)
{
bound %= arr.size();
size_t gcd = std::gcd(arr.size(), bound);
for (size_t i = 0; i < gcd; ++i) {
for (size_t i = 0; i < gcd; ++i)
{
size_t j = i;
do {
do
{
size_t next = j + bound;
if (next >= arr.size()) next -= arr.size();
if (next >= arr.size())
next -= arr.size();
std::swap(arr[j], arr[next]);
j = next;
} while (j != i);

View File

@ -390,7 +390,8 @@ public:
/// Place the element on the next free position.
writer[size - 1 - (++histograms[pass * HISTOGRAM_SIZE + pos])] = Traits::extractIndex(reader[i]);
}
} else
}
else
{
for (size_t i = 0; i < size; ++i)
{