Skip to content

Commit 7bc47cb

Browse files
gengjiawentargos
authored andcommitted
src: apply clang-tidy rule modernize-use-equals-default
PR-URL: #27264 Reviewed-By: Refael Ackermann <refack@gmail.com>
1 parent 3676288 commit 7bc47cb

32 files changed

+38
-50
lines changed

src/debug_utils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class NativeSymbolDebuggingContext {
100100
};
101101

102102
NativeSymbolDebuggingContext() = default;
103-
virtual ~NativeSymbolDebuggingContext() {}
103+
virtual ~NativeSymbolDebuggingContext() = default;
104104

105105
virtual SymbolInfo LookupSymbol(void* address) { return {}; }
106106
virtual bool IsMapped(void* address) { return false; }

src/env.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ struct AllocatedBuffer {
540540

541541
class AsyncRequest : public MemoryRetainer {
542542
public:
543-
AsyncRequest() {}
543+
AsyncRequest() = default;
544544
~AsyncRequest();
545545
void Install(Environment* env, void* data, uv_async_cb target);
546546
void Uninstall();

src/fs_event_wrap.cc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class FSEventWrap: public HandleWrap {
6565
static const encoding kDefaultEncoding = UTF8;
6666

6767
FSEventWrap(Environment* env, Local<Object> object);
68-
~FSEventWrap() override;
68+
~FSEventWrap() = default;
6969

7070
static void OnEvent(uv_fs_event_t* handle, const char* filename, int events,
7171
int status);
@@ -84,9 +84,6 @@ FSEventWrap::FSEventWrap(Environment* env, Local<Object> object)
8484
}
8585

8686

87-
FSEventWrap::~FSEventWrap() {
88-
}
89-
9087
void FSEventWrap::GetInitialized(const FunctionCallbackInfo<Value>& args) {
9188
FSEventWrap* wrap = Unwrap<FSEventWrap>(args.This());
9289
CHECK_NOT_NULL(wrap);

src/inspector/main_thread_interface.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ class MainThreadInterface;
2626
class Request {
2727
public:
2828
virtual void Call(MainThreadInterface*) = 0;
29-
virtual ~Request() {}
29+
virtual ~Request() = default;
3030
};
3131

3232
class Deletable {
3333
public:
34-
virtual ~Deletable() {}
34+
virtual ~Deletable() = default;
3535
};
3636

3737
std::unique_ptr<v8_inspector::StringBuffer> Utf8ToStringView(

src/inspector/worker_inspector.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class WorkerDelegate {
2121
const std::string& url,
2222
bool waiting,
2323
std::shared_ptr<MainThreadHandle> worker) = 0;
24-
virtual ~WorkerDelegate() {}
24+
virtual ~WorkerDelegate() = default;
2525
};
2626

2727
class WorkerManagerEventHandle {

src/inspector_agent.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ class InspectorTimer {
354354
// Unique_ptr goes out of scope here and pointer is deleted.
355355
}
356356

357-
~InspectorTimer() {}
357+
~InspectorTimer() = default;
358358

359359
Environment* env_;
360360
uv_timer_t timer_;

src/inspector_agent.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class WorkerManager;
3030

3131
class InspectorSession {
3232
public:
33-
virtual ~InspectorSession() {}
33+
virtual ~InspectorSession() = default;
3434
virtual void Dispatch(const v8_inspector::StringView& message) = 0;
3535
};
3636

src/inspector_io.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,7 @@ class InspectorIoDelegate: public node::inspector::SocketServerDelegate {
217217
const std::string& target_id,
218218
const std::string& script_path,
219219
const std::string& script_name);
220-
~InspectorIoDelegate() override {
221-
}
220+
~InspectorIoDelegate() override = default;
222221

223222
void StartSession(int session_id, const std::string& target_id) override;
224223
void MessageReceived(int session_id, const std::string& message) override;

src/inspector_socket.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class InspectorSocket {
2525
const std::string& path,
2626
const std::string& accept_key) = 0;
2727
virtual void OnWsFrame(const std::vector<char>& frame) = 0;
28-
virtual ~Delegate() {}
28+
virtual ~Delegate() = default;
2929
};
3030

3131
using DelegatePointer = std::unique_ptr<Delegate>;

src/inspector_socket_server.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class SocketServerDelegate {
3131
virtual std::vector<std::string> GetTargetIds() = 0;
3232
virtual std::string GetTargetTitle(const std::string& id) = 0;
3333
virtual std::string GetTargetUrl(const std::string& id) = 0;
34-
virtual ~SocketServerDelegate() {}
34+
virtual ~SocketServerDelegate() = default;
3535
};
3636

3737
// HTTP Server, writes messages requested as TransportActions, and responds

0 commit comments

Comments
 (0)