mirror of
https://github.com/nodejs/node.git
synced 2026-11-26 21:58:26 -05:00
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: https://github.com/nodejs/node/pull/20663
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
This commit is contained in:
1 parent
2347ce8870
commit
57dfd64f8f
2 files changed
+3
-3
No files matched your search
+1
-1
@@ -3377,7 +3377,7 @@ class Work : public node::AsyncResource, public node::ThreadPoolWork {
|
||||
_execute(_env, _data);
|
||||
}
|
||||
|
||||
void AfterThreadPoolWork(int status) {
|
||||
void AfterThreadPoolWork(int status) override {
|
||||
if (_complete == nullptr)
|
||||
return;
|
||||
|
||||
|
||||
+2
-2
@@ -217,11 +217,11 @@ class ZCtx : public AsyncWrap, public ThreadPoolWork {
|
||||
|
||||
// TODO(addaleax): Make these methods non-static. It's a significant bunch
|
||||
// of churn that's better left for a separate PR.
|
||||
void DoThreadPoolWork() {
|
||||
void DoThreadPoolWork() override {
|
||||
Process(this);
|
||||
}
|
||||
|
||||
void AfterThreadPoolWork(int status) {
|
||||
void AfterThreadPoolWork(int status) override {
|
||||
After(this, status);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user