Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 57dfd64

Browse filesBrowse files
danbevaddaleax
authored andcommitted
src: add missing override to ThreadPoolWork funcs
Currently the following warnings are displayed when compiling: ../src/node_api.cc:3380:8: warning: 'AfterThreadPoolWork' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] void AfterThreadPoolWork(int status) { ^ ../src/node_internals.h:513:16: note: overridden virtual function is here virtual void AfterThreadPoolWork(int status) = 0; ^ 1 warning generated. ../src/node_zlib.cc:220:8: warning: 'DoThreadPoolWork' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] void DoThreadPoolWork() { ^ ../src/node_internals.h:512:16: note: overridden virtual function is here virtual void DoThreadPoolWork() = 0; ^ ../src/node_zlib.cc:224:8: warning: 'AfterThreadPoolWork' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] void AfterThreadPoolWork(int status) { ^ ../src/node_internals.h:513:16: note: overridden virtual function is here virtual void AfterThreadPoolWork(int status) = 0; ^ 2 warnings generated. This commit adds override to the functions. PR-URL: #20663 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
1 parent 2347ce8 commit 57dfd64
Copy full SHA for 57dfd64

File tree

Expand file treeCollapse file tree

2 files changed

+3
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+3
-3
lines changed
Open diff view settings
Collapse file

‎src/node_api.cc‎

Copy file name to clipboardExpand all lines: src/node_api.cc
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3377,7 +3377,7 @@ class Work : public node::AsyncResource, public node::ThreadPoolWork {
33773377
_execute(_env, _data);
33783378
}
33793379

3380-
void AfterThreadPoolWork(int status) {
3380+
void AfterThreadPoolWork(int status) override {
33813381
if (_complete == nullptr)
33823382
return;
33833383

Collapse file

‎src/node_zlib.cc‎

Copy file name to clipboardExpand all lines: src/node_zlib.cc
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,11 +217,11 @@ class ZCtx : public AsyncWrap, public ThreadPoolWork {
217217

218218
// TODO(addaleax): Make these methods non-static. It's a significant bunch
219219
// of churn that's better left for a separate PR.
220-
void DoThreadPoolWork() {
220+
void DoThreadPoolWork() override {
221221
Process(this);
222222
}
223223

224-
void AfterThreadPoolWork(int status) {
224+
void AfterThreadPoolWork(int status) override {
225225
After(this, status);
226226
}
227227

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.