mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-29 05:00:47 +00:00
fix style
This commit is contained in:
parent
b88d0dec1c
commit
3267eaa498
@ -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);
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user