summaryrefslogtreecommitdiff
path: root/src/node_zlib.cc
diff options
context:
space:
mode:
authorDaniel Bevenius <daniel.bevenius@gmail.com>2018-05-16 09:06:46 +0200
committerDaniel Bevenius <daniel.bevenius@gmail.com>2018-05-18 06:17:16 +0200
commit0419adc7713fb6c6a4def28542740bf9a69e7ac9 (patch)
tree1e28a9871813b2116d86087ef8a73aa7320f22f0 /src/node_zlib.cc
parentfa0cac51b9d30c5ce3a1f82aba02754be447ae65 (diff)
downloadandroid-node-v8-0419adc7713fb6c6a4def28542740bf9a69e7ac9.tar.gz
android-node-v8-0419adc7713fb6c6a4def28542740bf9a69e7ac9.tar.bz2
android-node-v8-0419adc7713fb6c6a4def28542740bf9a69e7ac9.zip
src: add override to ThreadPool methods in zlib
Currently the following compiler warnings are generated: ../src/node_zlib.cc:222:8: warning: 'DoThreadPoolWork' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] void DoThreadPoolWork() { ^ ../src/node_internals.h:509:16: note: overridden virtual function is here virtual void DoThreadPoolWork() = 0; ^ ../src/node_zlib.cc:357:8: warning: 'AfterThreadPoolWork' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] void AfterThreadPoolWork(int status) { ^ ../src/node_internals.h:510:16: note: overridden virtual function is here virtual void AfterThreadPoolWork(int status) = 0; ^ This commit adds the override specifier to the methods to silence the warnings. PR-URL: https://github.com/nodejs/node/pull/20769 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'src/node_zlib.cc')
-rw-r--r--src/node_zlib.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/node_zlib.cc b/src/node_zlib.cc
index 632dad1f81..87415eb575 100644
--- a/src/node_zlib.cc
+++ b/src/node_zlib.cc
@@ -219,7 +219,7 @@ class ZCtx : public AsyncWrap, public ThreadPoolWork {
// This function may be called multiple times on the uv_work pool
// for a single write() call, until all of the input bytes have
// been consumed.
- void DoThreadPoolWork() {
+ void DoThreadPoolWork() override {
const Bytef* next_expected_header_byte = nullptr;
// If the avail_out is left at 0, then it means that it ran out
@@ -353,7 +353,7 @@ class ZCtx : public AsyncWrap, public ThreadPoolWork {
// v8 land!
- void AfterThreadPoolWork(int status) {
+ void AfterThreadPoolWork(int status) override {
write_in_progress_ = false;
if (status == UV_ECANCELED) {