Skip to content

Commit e6949b4

Browse files
gengjiawenrvagg
authored andcommitted
src: apply clang-tidy rule modernize-use-override
PR-URL: #26103 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent 28d6074 commit e6949b4

27 files changed

+40
-40
lines changed

src/async_wrap.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class AsyncWrap : public BaseObject {
109109
ProviderType provider,
110110
double execution_async_id = -1);
111111

112-
virtual ~AsyncWrap();
112+
~AsyncWrap() override;
113113

114114
static v8::Local<v8::FunctionTemplate> GetConstructorTemplate(
115115
Environment* env);
@@ -169,7 +169,7 @@ class AsyncWrap : public BaseObject {
169169
v8::Local<v8::Value>* argv);
170170

171171
virtual std::string diagnostic_name() const;
172-
virtual std::string MemoryInfoName() const;
172+
std::string MemoryInfoName() const override;
173173

174174
static void WeakCallback(const v8::WeakCallbackInfo<DestroyParam> &info);
175175

src/base_object.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class BaseObject : public MemoryRetainer {
3838
// Associates this object with `object`. It uses the 0th internal field for
3939
// that, and in particular aborts if there is no such field.
4040
inline BaseObject(Environment* env, v8::Local<v8::Object> object);
41-
virtual inline ~BaseObject();
41+
inline ~BaseObject() override;
4242

4343
// Returns the wrapped object. Returns an empty handle when
4444
// persistent.IsEmpty() is true.

src/cares_wrap.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ using node_ares_task_list =
149149
class ChannelWrap : public AsyncWrap {
150150
public:
151151
ChannelWrap(Environment* env, Local<Object> object);
152-
~ChannelWrap();
152+
~ChannelWrap() override;
153153

154154
static void New(const FunctionCallbackInfo<Value>& args);
155155

src/inspector/main_thread_interface.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class CreateObjectRequest : public Request {
4242
CreateObjectRequest(int object_id, Factory factory)
4343
: object_id_(object_id), factory_(std::move(factory)) {}
4444

45-
void Call(MainThreadInterface* thread) {
45+
void Call(MainThreadInterface* thread) override {
4646
thread->AddObject(object_id_, WrapInDeletable(factory_(thread)));
4747
}
4848

src/inspector_agent.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ class ChannelImpl final : public v8_inspector::V8Inspector::Channel,
228228
worker_agent_->Wire(node_dispatcher_.get());
229229
}
230230

231-
virtual ~ChannelImpl() {
231+
~ChannelImpl() override {
232232
tracing_agent_->disable();
233233
tracing_agent_.reset(); // Dispose before the dispatchers
234234
worker_agent_->disable();

src/inspector_io.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ class InspectorIoDelegate: public node::inspector::SocketServerDelegate {
215215
const std::string& target_id,
216216
const std::string& script_path,
217217
const std::string& script_name);
218-
~InspectorIoDelegate() {
218+
~InspectorIoDelegate() override {
219219
}
220220

221221
void StartSession(int session_id, const std::string& target_id) override;

src/inspector_socket_server.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ class SocketSession {
184184
public:
185185
Delegate(InspectorSocketServer* server, int session_id)
186186
: server_(server), session_id_(session_id) { }
187-
~Delegate() {
187+
~Delegate() override {
188188
server_->SessionTerminated(session_id_);
189189
}
190190
void OnHttpGet(const std::string& host, const std::string& path) override;

src/module_wrap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class ModuleWrap : public BaseObject {
6161
v8::Local<v8::Object> object,
6262
v8::Local<v8::Module> module,
6363
v8::Local<v8::String> url);
64-
~ModuleWrap();
64+
~ModuleWrap() override;
6565

6666
static void New(const v8::FunctionCallbackInfo<v8::Value>& args);
6767
static void Link(const v8::FunctionCallbackInfo<v8::Value>& args);

src/node.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ class Environment;
220220

221221
class NODE_EXTERN MultiIsolatePlatform : public v8::Platform {
222222
public:
223-
virtual ~MultiIsolatePlatform() { }
223+
~MultiIsolatePlatform() override { }
224224
// Returns true if work was dispatched or executed. New tasks that are
225225
// posted during flushing of the queue are postponed until the next
226226
// flushing.

src/node_api.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ class ThreadSafeFunction : public node::AsyncResource {
134134
env->Ref();
135135
}
136136

137-
~ThreadSafeFunction() {
137+
~ThreadSafeFunction() override {
138138
node::RemoveEnvironmentCleanupHook(env->isolate, Cleanup, this);
139139
env->Unref();
140140
}
@@ -839,7 +839,7 @@ class Work : public node::AsyncResource, public node::ThreadPoolWork {
839839
_complete(complete) {
840840
}
841841

842-
virtual ~Work() { }
842+
~Work() override { }
843843

844844
public:
845845
static Work* New(node_napi_env env,

0 commit comments

Comments
 (0)