From 3267eaa49840a21de35386f15912a7c8bac2bac0 Mon Sep 17 00:00:00 2001 From: g-arslan Date: Thu, 21 May 2020 14:39:40 +0300 Subject: [PATCH] fix style --- src/Columns/ColumnVector.cpp | 11 +++++++---- src/Common/RadixSort.h | 3 ++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/Columns/ColumnVector.cpp b/src/Columns/ColumnVector.cpp index cf6d9cf030b..20fc68c0a14 100644 --- a/src/Columns/ColumnVector.cpp +++ b/src/Columns/ColumnVector.cpp @@ -125,15 +125,18 @@ namespace } template -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); diff --git a/src/Common/RadixSort.h b/src/Common/RadixSort.h index 88ddc3a1d15..fea27ae36db 100644 --- a/src/Common/RadixSort.h +++ b/src/Common/RadixSort.h @@ -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) {