From d8c85a5083b8231f86b25118ba4929fa3b4836ce Mon Sep 17 00:00:00 2001 From: Keenan Gugeler Date: Tue, 28 Nov 2023 14:37:59 -0500 Subject: [PATCH] tidy: remove trivial constructors Also removed trivial destructors. Also removed clangd.log, a temporary file that was accidentally committed in #2507. --- clangd.log | 14 -------------- src/include/binder/visitor/property_collector.h | 2 -- src/include/common/serializer/reader.h | 2 +- src/include/main/client_context.h | 3 +-- .../processor/operator/aggregate/base_aggregate.h | 2 +- .../persistent/reader/parquet/resizable_buffer.h | 4 ++-- .../writer/parquet/string_column_writer.h | 2 -- src/include/storage/buffer_manager/locked_queue.h | 2 -- src/main/client_context.cpp | 2 -- src/main/connection.cpp | 2 +- 10 files changed, 6 insertions(+), 29 deletions(-) delete mode 100644 clangd.log diff --git a/clangd.log b/clangd.log deleted file mode 100644 index 9edac73579..0000000000 --- a/clangd.log +++ /dev/null @@ -1,14 +0,0 @@ -cmake -B build/release -DCMAKE_SHARED_LINKER_FLAGS=-fuse-ld=lld -DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=lld -DCMAKE_MODULE_LINKER_FLAGS=-fuse-ld=lld -G "Ninja" -DENABLE_RUNTIME_CHECKS=TRUE -DENABLE_WERROR=TRUE -DCMAKE_BUILD_TYPE=Release -DBUILD_BENCHMARK=TRUE -DBUILD_EXAMPLES=TRUE -DBUILD_JAVA=TRUE -DBUILD_NODEJS=TRUE -DBUILD_PYTHON=TRUE -DBUILD_SHELL=TRUE -DBUILD_TESTS=TRUE . --- pybind11 v2.11.0 dev1 --- JNI_INCLUDE_DIRS=/usr/lib/jvm/default-java/include;/usr/lib/jvm/default-java/include/linux;/usr/lib/jvm/default-java/include --- JNI_LIBRARIES=/usr/lib/jvm/default-java/lib/libjawt.so;/usr/lib/jvm/default-java/lib/server/libjvm.so --- OS_NAME=linux --- OS_ARCH=amd64 --- CMake.js configurations: LIB=, INC=/home/keenan/.cmake-js/node-x64/v18.13.0/include/node, SRC= --- Configuring done --- Generating done --- Build files have been written to: /home/keenan/Projects/kuzu/build/release -cmake --build build/release --target kuzu_java -ninja: no work to do. -run-clang-tidy -p build/release -quiet -j 100 \ - "^/home/keenan/Projects/kuzu/src|/home/keenan/Projects/kuzu/tools/(?!shell/linenoise.cpp)|/home/keenan/Projects/kuzu/examples" diff --git a/src/include/binder/visitor/property_collector.h b/src/include/binder/visitor/property_collector.h index 729659d777..eabd27d709 100644 --- a/src/include/binder/visitor/property_collector.h +++ b/src/include/binder/visitor/property_collector.h @@ -7,8 +7,6 @@ namespace binder { class PropertyCollector : public BoundStatementVisitor { public: - PropertyCollector() : BoundStatementVisitor() {} - expression_vector getProperties(); private: diff --git a/src/include/common/serializer/reader.h b/src/include/common/serializer/reader.h index 7a63207a3e..6a3120adb8 100644 --- a/src/include/common/serializer/reader.h +++ b/src/include/common/serializer/reader.h @@ -8,7 +8,7 @@ namespace common { class Reader { public: virtual void read(uint8_t* data, uint64_t size) = 0; - virtual ~Reader(){}; + virtual ~Reader() = default; }; } // namespace common diff --git a/src/include/main/client_context.h b/src/include/main/client_context.h index c91837e55b..ab40f859e3 100644 --- a/src/include/main/client_context.h +++ b/src/include/main/client_context.h @@ -7,6 +7,7 @@ #include "common/timer.h" #include "main/kuzu_fwd.h" +#include "transaction/transaction_context.h" namespace kuzu { @@ -44,8 +45,6 @@ class ClientContext { public: explicit ClientContext(Database* database); - ~ClientContext(); - inline void interrupt() { activeQuery.interrupted = true; } bool isInterrupted() const { return activeQuery.interrupted; } diff --git a/src/include/processor/operator/aggregate/base_aggregate.h b/src/include/processor/operator/aggregate/base_aggregate.h index f592582ca9..65365e45c3 100644 --- a/src/include/processor/operator/aggregate/base_aggregate.h +++ b/src/include/processor/operator/aggregate/base_aggregate.h @@ -14,7 +14,7 @@ class BaseAggregateSharedState { virtual std::pair getNextRangeToRead() = 0; - ~BaseAggregateSharedState() {} + ~BaseAggregateSharedState() = default; protected: std::mutex mtx; diff --git a/src/include/processor/operator/persistent/reader/parquet/resizable_buffer.h b/src/include/processor/operator/persistent/reader/parquet/resizable_buffer.h index cf4fcba183..c9de98a895 100644 --- a/src/include/processor/operator/persistent/reader/parquet/resizable_buffer.h +++ b/src/include/processor/operator/persistent/reader/parquet/resizable_buffer.h @@ -9,7 +9,7 @@ namespace processor { class ByteBuffer { // on to the 10 thousandth impl public: - ByteBuffer(){}; + ByteBuffer() = default; ByteBuffer(uint8_t* ptr, uint64_t len) : ptr{ptr}, len{len} {}; uint8_t* ptr = nullptr; @@ -59,7 +59,7 @@ class ByteBuffer { // on to the 10 thousandth impl class ResizeableBuffer : public ByteBuffer { public: - ResizeableBuffer() {} + ResizeableBuffer() = default; explicit ResizeableBuffer(uint64_t new_size) { resize(new_size); } void resize(uint64_t new_size) { len = new_size; diff --git a/src/include/processor/operator/persistent/writer/parquet/string_column_writer.h b/src/include/processor/operator/persistent/writer/parquet/string_column_writer.h index 40df8f7dd5..cf9979474e 100644 --- a/src/include/processor/operator/persistent/writer/parquet/string_column_writer.h +++ b/src/include/processor/operator/persistent/writer/parquet/string_column_writer.h @@ -20,8 +20,6 @@ using string_map_t = std::unordered_map q; public: - LockedQueue() {} - void enqueue(T x) { std::scoped_lock lck{mtx}; q.push(std::move(x)); diff --git a/src/main/client_context.cpp b/src/main/client_context.cpp index 5f78b58c99..6931a63b62 100644 --- a/src/main/client_context.cpp +++ b/src/main/client_context.cpp @@ -29,8 +29,6 @@ ClientContext::ClientContext(Database* database) transactionContext = std::make_unique(database); } -ClientContext::~ClientContext() {} - void ClientContext::startTimingIfEnabled() { if (isTimeOutEnabled()) { activeQuery.timer.start(); diff --git a/src/main/connection.cpp b/src/main/connection.cpp index 91b35aa0d0..9011ea9414 100644 --- a/src/main/connection.cpp +++ b/src/main/connection.cpp @@ -6,8 +6,8 @@ #include "common/exception/connection.h" #include "main/database.h" #include "optimizer/optimizer.h" -#include "parser//visitor/statement_read_write_analyzer.h" #include "parser/parser.h" +#include "parser/visitor/statement_read_write_analyzer.h" #include "planner/operator/logical_plan_util.h" #include "planner/planner.h" #include "processor/plan_mapper.h"