Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tidy: remove trivial constructors #2511

Merged
merged 1 commit into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions clangd.log

This file was deleted.

2 changes: 0 additions & 2 deletions src/include/binder/visitor/property_collector.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ namespace binder {

class PropertyCollector : public BoundStatementVisitor {
public:
PropertyCollector() : BoundStatementVisitor() {}

expression_vector getProperties();

private:
Expand Down
2 changes: 1 addition & 1 deletion src/include/common/serializer/reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions src/include/main/client_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include "common/timer.h"
#include "main/kuzu_fwd.h"
#include "transaction/transaction_context.h"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like we are introducing a new include, which wasn't added previously, here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes because we need access to the transaction context destructor in order to generate the destructor for clientcontext

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got it. make sense


namespace kuzu {

Expand Down Expand Up @@ -44,8 +45,6 @@ class ClientContext {
public:
explicit ClientContext(Database* database);

~ClientContext();

inline void interrupt() { activeQuery.interrupted = true; }

bool isInterrupted() const { return activeQuery.interrupted; }
Expand Down
2 changes: 1 addition & 1 deletion src/include/processor/operator/aggregate/base_aggregate.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class BaseAggregateSharedState {

virtual std::pair<uint64_t, uint64_t> getNextRangeToRead() = 0;

~BaseAggregateSharedState() {}
~BaseAggregateSharedState() = default;

protected:
std::mutex mtx;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ using string_map_t = std::unordered_map<common::ku_string_t, T, StringHash, Stri

class StringStatisticsState : public ColumnWriterStatistics {
public:
StringStatisticsState() : hasStats(false), valuesTooBig(false), min(), max() {}

bool hasStats;
bool valuesTooBig;
std::string min;
Expand Down
2 changes: 0 additions & 2 deletions src/include/storage/buffer_manager/locked_queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ class LockedQueue {
std::queue<T> q;

public:
LockedQueue() {}

void enqueue(T x) {
std::scoped_lock lck{mtx};
q.push(std::move(x));
Expand Down
2 changes: 0 additions & 2 deletions src/main/client_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ ClientContext::ClientContext(Database* database)
transactionContext = std::make_unique<TransactionContext>(database);
}

ClientContext::~ClientContext() {}

void ClientContext::startTimingIfEnabled() {
if (isTimeOutEnabled()) {
activeQuery.timer.start();
Expand Down
2 changes: 1 addition & 1 deletion src/main/connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down