From b9165252e3a9115fe991042b75caa08c0993e347 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Mon, 17 Jun 2013 23:25:01 +0200 Subject: [PATCH] src: clean up `using` directives Remove the unused ones and alphabetically sort the ones that remain. --- src/cares_wrap.cc | 1 - src/handle_wrap.cc | 6 ------ src/node_script.cc | 21 ++++++++++----------- src/pipe_wrap.cc | 2 -- src/process_wrap.cc | 22 ++++++++++------------ src/signal_wrap.cc | 16 +++++++--------- src/slab_allocator.cc | 2 +- src/stream_wrap.cc | 5 ----- src/string_bytes.cc | 1 - src/tcp_wrap.cc | 2 -- src/timer_wrap.cc | 16 +++++++--------- src/tty_wrap.cc | 2 -- src/v8_typed_array.cc | 2 +- 13 files changed, 36 insertions(+), 62 deletions(-) diff --git a/src/cares_wrap.cc b/src/cares_wrap.cc index d80c93a..0b12bce 100644 --- a/src/cares_wrap.cc +++ b/src/cares_wrap.cc @@ -47,7 +47,6 @@ namespace cares_wrap { using v8::Arguments; using v8::Array; -using v8::Context; using v8::Function; using v8::Handle; using v8::HandleScope; diff --git a/src/handle_wrap.cc b/src/handle_wrap.cc index 5de0daa..cf3768a 100644 --- a/src/handle_wrap.cc +++ b/src/handle_wrap.cc @@ -26,18 +26,12 @@ namespace node { using v8::Arguments; -using v8::Array; -using v8::Context; using v8::Function; -using v8::FunctionTemplate; using v8::Handle; using v8::HandleScope; -using v8::Integer; -using v8::Local; using v8::Object; using v8::Persistent; using v8::String; -using v8::TryCatch; using v8::Undefined; using v8::Value; diff --git a/src/node_script.cc b/src/node_script.cc index 9c83c39..639f41a 100644 --- a/src/node_script.cc +++ b/src/node_script.cc @@ -26,24 +26,23 @@ namespace node { +using v8::Arguments; +using v8::Array; using v8::Context; -using v8::Script; -using v8::Value; +using v8::Exception; +using v8::Function; +using v8::FunctionTemplate; using v8::Handle; using v8::HandleScope; +using v8::Local; using v8::Object; -using v8::Arguments; +using v8::Persistent; +using v8::Script; +using v8::String; using v8::ThrowException; using v8::TryCatch; -using v8::String; -using v8::Exception; -using v8::Local; -using v8::Array; -using v8::Persistent; -using v8::Integer; -using v8::Function; -using v8::FunctionTemplate; using v8::V8; +using v8::Value; class WrappedContext : ObjectWrap { diff --git a/src/pipe_wrap.cc b/src/pipe_wrap.cc index 6639b8d..1e3e5b0 100644 --- a/src/pipe_wrap.cc +++ b/src/pipe_wrap.cc @@ -31,7 +31,6 @@ namespace node { using v8::Arguments; using v8::Boolean; -using v8::Context; using v8::Function; using v8::FunctionTemplate; using v8::Handle; @@ -42,7 +41,6 @@ using v8::Object; using v8::Persistent; using v8::PropertyAttribute; using v8::String; -using v8::TryCatch; using v8::Value; extern Persistent pipeConstructorTmpl; diff --git a/src/process_wrap.cc b/src/process_wrap.cc index 4b14464..f8974dd 100644 --- a/src/process_wrap.cc +++ b/src/process_wrap.cc @@ -28,23 +28,21 @@ namespace node { -using v8::Object; +using v8::Arguments; +using v8::Array; +using v8::Exception; +using v8::Function; +using v8::FunctionTemplate; using v8::Handle; +using v8::HandleScope; +using v8::Integer; using v8::Local; +using v8::Number; +using v8::Object; using v8::Persistent; -using v8::Value; -using v8::HandleScope; -using v8::FunctionTemplate; using v8::String; -using v8::Array; -using v8::Number; -using v8::Function; -using v8::TryCatch; -using v8::Context; -using v8::Arguments; -using v8::Integer; -using v8::Exception; using v8::ThrowException; +using v8::Value; static Persistent onexit_sym; diff --git a/src/signal_wrap.cc b/src/signal_wrap.cc index 6fbe543..7f84553 100644 --- a/src/signal_wrap.cc +++ b/src/signal_wrap.cc @@ -25,19 +25,17 @@ namespace node { -using v8::Object; +using v8::Arguments; +using v8::Function; +using v8::FunctionTemplate; using v8::Handle; +using v8::HandleScope; +using v8::Integer; using v8::Local; +using v8::Object; using v8::Persistent; -using v8::Value; -using v8::HandleScope; -using v8::FunctionTemplate; using v8::String; -using v8::Function; -using v8::TryCatch; -using v8::Context; -using v8::Arguments; -using v8::Integer; +using v8::Value; static Persistent onsignal_sym; diff --git a/src/slab_allocator.cc b/src/slab_allocator.cc index f51318f..476124c 100644 --- a/src/slab_allocator.cc +++ b/src/slab_allocator.cc @@ -36,8 +36,8 @@ using v8::Null; using v8::Object; using v8::Persistent; using v8::String; -using v8::Value; using v8::V8; +using v8::Value; namespace node { diff --git a/src/stream_wrap.cc b/src/stream_wrap.cc index adee3d6..bcedeb8 100644 --- a/src/stream_wrap.cc +++ b/src/stream_wrap.cc @@ -41,10 +41,6 @@ namespace node { using v8::AccessorInfo; using v8::Arguments; using v8::Array; -using v8::Context; -using v8::Exception; -using v8::Function; -using v8::FunctionTemplate; using v8::Handle; using v8::HandleScope; using v8::Integer; @@ -53,7 +49,6 @@ using v8::Number; using v8::Object; using v8::Persistent; using v8::String; -using v8::TryCatch; using v8::Value; diff --git a/src/string_bytes.cc b/src/string_bytes.cc index 416bc5a..db6bb8e 100644 --- a/src/string_bytes.cc +++ b/src/string_bytes.cc @@ -39,7 +39,6 @@ namespace node { using v8::Handle; using v8::HandleScope; using v8::Local; -using v8::Object; using v8::String; using v8::Value; diff --git a/src/tcp_wrap.cc b/src/tcp_wrap.cc index e0556aa..9901347 100644 --- a/src/tcp_wrap.cc +++ b/src/tcp_wrap.cc @@ -33,7 +33,6 @@ namespace node { using v8::Arguments; -using v8::Context; using v8::Function; using v8::FunctionTemplate; using v8::Handle; @@ -45,7 +44,6 @@ using v8::Object; using v8::Persistent; using v8::PropertyAttribute; using v8::String; -using v8::TryCatch; using v8::Undefined; using v8::Value; diff --git a/src/timer_wrap.cc b/src/timer_wrap.cc index a36cdab..23abc5c 100644 --- a/src/timer_wrap.cc +++ b/src/timer_wrap.cc @@ -24,19 +24,17 @@ namespace node { -using v8::Object; +using v8::Arguments; +using v8::Function; +using v8::FunctionTemplate; using v8::Handle; +using v8::HandleScope; +using v8::Integer; using v8::Local; +using v8::Object; using v8::Persistent; -using v8::Value; -using v8::HandleScope; -using v8::FunctionTemplate; using v8::String; -using v8::Function; -using v8::TryCatch; -using v8::Context; -using v8::Arguments; -using v8::Integer; +using v8::Value; static Persistent ontimeout_sym; diff --git a/src/tty_wrap.cc b/src/tty_wrap.cc index f96ab0c..182a260 100644 --- a/src/tty_wrap.cc +++ b/src/tty_wrap.cc @@ -30,7 +30,6 @@ namespace node { using v8::Arguments; -using v8::Context; using v8::Function; using v8::FunctionTemplate; using v8::Handle; @@ -41,7 +40,6 @@ using v8::Object; using v8::Persistent; using v8::PropertyAttribute; using v8::String; -using v8::TryCatch; using v8::Undefined; using v8::Value; diff --git a/src/v8_typed_array.cc b/src/v8_typed_array.cc index 4e73c30..4040110 100644 --- a/src/v8_typed_array.cc +++ b/src/v8_typed_array.cc @@ -31,9 +31,9 @@ namespace { +using node::ThrowError; using node::ThrowRangeError; using node::ThrowTypeError; -using node::ThrowError; struct BatchedMethods { const char* name; -- 2.7.4