Browse Source

src: mark empty destructors as default

Mark empty destructors as having a default no-op implementation.
Remove a few unused constructors and destructors while we are here.
archived-io.js-v0.12
Ben Noordhuis 10 years ago
parent
commit
5ab87dba73
  1. 3
      src/async-wrap-inl.h
  2. 2
      src/async-wrap.h
  3. 4
      src/node.cc
  4. 3
      src/node_crypto_clienthello.h
  5. 3
      src/node_v8_platform.cc
  6. 3
      src/process_wrap.cc
  7. 3
      src/signal_wrap.cc
  8. 3
      src/stream_wrap.h
  9. 3
      src/timer_wrap.cc
  10. 4
      src/udp_wrap.cc
  11. 1
      src/udp_wrap.h

3
src/async-wrap-inl.h

@ -54,9 +54,6 @@ inline AsyncWrap::AsyncWrap(Environment* env,
} }
inline AsyncWrap::~AsyncWrap() {
}
inline uint32_t AsyncWrap::provider_type() const { inline uint32_t AsyncWrap::provider_type() const {
return provider_type_; return provider_type_;
} }

2
src/async-wrap.h

@ -61,7 +61,7 @@ class AsyncWrap : public BaseObject {
v8::Handle<v8::Object> object, v8::Handle<v8::Object> object,
ProviderType provider); ProviderType provider);
inline ~AsyncWrap(); inline ~AsyncWrap() = default;
inline bool has_async_listener(); inline bool has_async_listener();

4
src/node.cc

@ -159,12 +159,12 @@ class ArrayBufferAllocator : public ArrayBuffer::Allocator {
// the process. // the process.
static const size_t kMaxLength = 0x3fffffff; static const size_t kMaxLength = 0x3fffffff;
static ArrayBufferAllocator the_singleton; static ArrayBufferAllocator the_singleton;
virtual ~ArrayBufferAllocator() {} virtual ~ArrayBufferAllocator() = default;
virtual void* Allocate(size_t length) override; virtual void* Allocate(size_t length) override;
virtual void* AllocateUninitialized(size_t length) override; virtual void* AllocateUninitialized(size_t length) override;
virtual void Free(void* data, size_t length) override; virtual void Free(void* data, size_t length) override;
private: private:
ArrayBufferAllocator() {} ArrayBufferAllocator() = default;
DISALLOW_COPY_AND_ASSIGN(ArrayBufferAllocator); DISALLOW_COPY_AND_ASSIGN(ArrayBufferAllocator);
}; };

3
src/node_crypto_clienthello.h

@ -47,9 +47,6 @@ class ClientHelloParser {
class ClientHello { class ClientHello {
public: public:
ClientHello() {
}
inline uint8_t session_size() const { return session_size_; } inline uint8_t session_size() const { return session_size_; }
inline const uint8_t* session_id() const { return session_id_; } inline const uint8_t* session_id() const { return session_id_; }
inline bool has_ticket() const { return has_ticket_; } inline bool has_ticket() const { return has_ticket_; }

3
src/node_v8_platform.cc

@ -35,9 +35,6 @@ using v8::Isolate;
// The last task to encounter before killing the worker // The last task to encounter before killing the worker
class StopTask : public Task { class StopTask : public Task {
public: public:
StopTask() {}
~StopTask() {}
void Run() {} void Run() {}
}; };

3
src/process_wrap.cc

@ -84,9 +84,6 @@ class ProcessWrap : public HandleWrap {
AsyncWrap::PROVIDER_PROCESSWRAP) { AsyncWrap::PROVIDER_PROCESSWRAP) {
} }
~ProcessWrap() {
}
static void ParseStdioOptions(Environment* env, static void ParseStdioOptions(Environment* env,
Local<Object> js_options, Local<Object> js_options,
uv_process_options_t* options) { uv_process_options_t* options) {

3
src/signal_wrap.cc

@ -80,9 +80,6 @@ class SignalWrap : public HandleWrap {
CHECK_EQ(r, 0); CHECK_EQ(r, 0);
} }
~SignalWrap() {
}
static void Start(const FunctionCallbackInfo<Value>& args) { static void Start(const FunctionCallbackInfo<Value>& args) {
SignalWrap* wrap = Unwrap<SignalWrap>(args.Holder()); SignalWrap* wrap = Unwrap<SignalWrap>(args.Holder());
int signum = args[0]->Int32Value(); int signum = args[0]->Int32Value();

3
src/stream_wrap.h

@ -72,8 +72,7 @@ class StreamWrapCallbacks {
explicit StreamWrapCallbacks(StreamWrapCallbacks* old) : wrap_(old->wrap()) { explicit StreamWrapCallbacks(StreamWrapCallbacks* old) : wrap_(old->wrap()) {
} }
virtual ~StreamWrapCallbacks() { virtual ~StreamWrapCallbacks() = default;
}
virtual const char* Error(); virtual const char* Error();

3
src/timer_wrap.cc

@ -91,9 +91,6 @@ class TimerWrap : public HandleWrap {
CHECK_EQ(r, 0); CHECK_EQ(r, 0);
} }
~TimerWrap() {
}
static void Start(const FunctionCallbackInfo<Value>& args) { static void Start(const FunctionCallbackInfo<Value>& args) {
TimerWrap* wrap = Unwrap<TimerWrap>(args.Holder()); TimerWrap* wrap = Unwrap<TimerWrap>(args.Holder());

4
src/udp_wrap.cc

@ -82,10 +82,6 @@ UDPWrap::UDPWrap(Environment* env, Handle<Object> object)
} }
UDPWrap::~UDPWrap() {
}
void UDPWrap::Initialize(Handle<Object> target, void UDPWrap::Initialize(Handle<Object> target,
Handle<Value> unused, Handle<Value> unused,
Handle<Context> context) { Handle<Context> context) {

1
src/udp_wrap.h

@ -58,7 +58,6 @@ class UDPWrap: public HandleWrap {
private: private:
UDPWrap(Environment* env, v8::Handle<v8::Object> object); UDPWrap(Environment* env, v8::Handle<v8::Object> object);
virtual ~UDPWrap() override;
static void DoBind(const v8::FunctionCallbackInfo<v8::Value>& args, static void DoBind(const v8::FunctionCallbackInfo<v8::Value>& args,
int family); int family);

Loading…
Cancel
Save