mirror of https://github.com/ByConity/ByConity
Implemented some suggestions from clang-tidy (part 4) [#CLICKHOUSE-3301].
This commit is contained in:
parent
d29c77adea
commit
8c9ec83a33
|
@ -52,9 +52,6 @@ struct Test
|
|||
{
|
||||
DB::WriteBufferFromFile wb(filename);
|
||||
wb.write(reinterpret_cast<const char *>(&store), sizeof(store));
|
||||
const unsigned char * p = reinterpret_cast<const unsigned char *>(&store);
|
||||
for (size_t i = 0; i < sizeof(store); ++i)
|
||||
++*p;
|
||||
}
|
||||
|
||||
{
|
||||
|
|
|
@ -181,7 +181,7 @@ private:
|
|||
size_t pos;
|
||||
|
||||
Cursor() {}
|
||||
explicit Cursor(MergingBlockPtr block_, size_t pos_ = 0) : block(block_), pos(pos_) {}
|
||||
explicit Cursor(const MergingBlockPtr & block_, size_t pos_ = 0) : block(block_), pos(pos_) {}
|
||||
|
||||
bool operator< (const Cursor & rhs) const
|
||||
{
|
||||
|
|
|
@ -8,9 +8,9 @@ namespace ErrorCodes
|
|||
extern const int SET_SIZE_LIMIT_EXCEEDED;
|
||||
}
|
||||
|
||||
DistinctSortedBlockInputStream::DistinctSortedBlockInputStream(const BlockInputStreamPtr & input, const Limits & limits, size_t limit_hint_, Names columns_)
|
||||
DistinctSortedBlockInputStream::DistinctSortedBlockInputStream(const BlockInputStreamPtr & input, const Limits & limits, size_t limit_hint_, const Names & columns)
|
||||
: description(input->getSortDescription())
|
||||
, columns_names(columns_)
|
||||
, columns_names(columns)
|
||||
, limit_hint(limit_hint_)
|
||||
, max_rows(limits.max_rows_in_distinct)
|
||||
, max_bytes(limits.max_bytes_in_distinct)
|
||||
|
|
|
@ -21,7 +21,7 @@ class DistinctSortedBlockInputStream : public IProfilingBlockInputStream
|
|||
{
|
||||
public:
|
||||
/// Empty columns_ means all collumns.
|
||||
DistinctSortedBlockInputStream(const BlockInputStreamPtr & input, const Limits & limits, size_t limit_hint_, Names columns_);
|
||||
DistinctSortedBlockInputStream(const BlockInputStreamPtr & input, const Limits & limits, size_t limit_hint_, const Names & columns);
|
||||
|
||||
String getName() const override { return "DistinctSorted"; }
|
||||
|
||||
|
|
|
@ -142,7 +142,7 @@ void IProfilingBlockInputStream::updateExtremes(Block & block)
|
|||
|
||||
bool IProfilingBlockInputStream::checkLimits()
|
||||
{
|
||||
auto handle_overflow_mode = [this] (OverflowMode mode, const String & message, int code)
|
||||
auto handle_overflow_mode = [] (OverflowMode mode, const String & message, int code)
|
||||
{
|
||||
switch (mode)
|
||||
{
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# http://clang.llvm.org/extra/clang-tidy/
|
||||
# Install latest clang with extra tools.
|
||||
# Look at utils/prepare-environment/install-clang.sh
|
||||
|
||||
|
|
Loading…
Reference in New Issue