Skip to content

Commit

Permalink
tidy: remove trivial constructors
Browse files Browse the repository at this point in the history
Also removed trivial destructors. Also removed clangd.log, a temporary
file that was accidentally committed in #2507.
  • Loading branch information
Riolku committed Nov 28, 2023
1 parent 85e7ae4 commit d8c85a5
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 29 deletions.
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"

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

0 comments on commit d8c85a5

Please sign in to comment.