Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
src: more modernize use-equals-default
  • Loading branch information
CGQAQ committed Jul 11, 2023
commit b2a9d7fb569b490ca266d1c58940d0f90ebda767
4 changes: 2 additions & 2 deletions src/blob_serializer_deserializer.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class BlobDeserializer : public BlobSerializerDeserializer {
public:
explicit BlobDeserializer(bool is_debug_v, std::string_view s)
: BlobSerializerDeserializer(is_debug_v), sink(s) {}
~BlobDeserializer() {}
~BlobDeserializer() = default;

size_t read_total = 0;
std::string_view sink;
Expand Down Expand Up @@ -85,7 +85,7 @@ class BlobSerializer : public BlobSerializerDeserializer {
public:
explicit BlobSerializer(bool is_debug_v)
: BlobSerializerDeserializer(is_debug_v) {}
~BlobSerializer() {}
~BlobSerializer() = default;

Impl* impl() { return static_cast<Impl*>(this); }
const Impl* impl() const { return static_cast<const Impl*>(this); }
Expand Down
2 changes: 1 addition & 1 deletion src/crypto/crypto_ec.cc
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ void ECDH::MemoryInfo(MemoryTracker* tracker) const {
tracker->TrackFieldWithSize("key", key_ ? kSizeOf_EC_KEY : 0);
}

ECDH::~ECDH() {}
ECDH::~ECDH() = default;

void ECDH::New(const FunctionCallbackInfo<Value>& args) {
Environment* env = Environment::GetCurrent(args);
Expand Down
2 changes: 0 additions & 2 deletions src/inspector_agent.cc
Original file line number Diff line number Diff line change
Expand Up @@ -687,8 +687,6 @@ Agent::Agent(Environment* env)
debug_options_(env->options()->debug_options()),
host_port_(env->inspector_host_port()) {}

Agent::~Agent() {}

bool Agent::Start(const std::string& path,
const DebugOptions& options,
std::shared_ptr<ExclusiveAccess<HostPort>> host_port,
Expand Down
2 changes: 1 addition & 1 deletion src/inspector_agent.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class InspectorSessionDelegate {
class Agent {
public:
explicit Agent(node::Environment* env);
~Agent();
~Agent() = default;

// Create client_, may create io_ if option enabled
bool Start(const std::string& path,
Expand Down
4 changes: 2 additions & 2 deletions src/js_native_api_v8.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ namespace v8impl {

class RefTracker {
public:
RefTracker() {}
virtual ~RefTracker() {}
RefTracker() = default;
virtual ~RefTracker() = default;
virtual void Finalize() {}

typedef RefTracker RefList;
Expand Down
2 changes: 1 addition & 1 deletion src/json_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace node {
class JSONParser {
public:
JSONParser();
~JSONParser() {}
~JSONParser() = default;
bool Parse(const std::string& content);
std::optional<std::string> GetTopLevelStringField(std::string_view field);
std::optional<bool> GetTopLevelBoolField(std::string_view field);
Expand Down