From be81dd2a7c9595c309741b3d9ba14a6c576dd661 Mon Sep 17 00:00:00 2001 From: Santiago Gimeno Date: Sat, 6 May 2017 21:26:03 +0200 Subject: [PATCH] http2: code cleanup Remove unnecessary includes. Remove unnecesary `using` statements. --- src/node_http2.cc | 32 -------------------------------- src/node_http2.h | 31 ------------------------------- src/node_http2_core-inl.h | 6 ------ src/node_http2_core.cc | 1 - src/node_http2_core.h | 2 -- 5 files changed, 72 deletions(-) diff --git a/src/node_http2.cc b/src/node_http2.cc index 9ae40094ad..29330d215e 100755 --- a/src/node_http2.cc +++ b/src/node_http2.cc @@ -1,45 +1,13 @@ #include "node.h" #include "node_buffer.h" -#include "nghttp2/nghttp2.h" #include "node_http2.h" -#include "node_http2_core.h" -#include "node_http2_core-inl.h" -#include "stream_base.h" -#include "stream_base-inl.h" -#include "string_bytes.h" - -#include "async-wrap.h" -#include "async-wrap-inl.h" -#include "env.h" -#include "env-inl.h" -#include "util.h" -#include "util-inl.h" -#include "v8-profiler.h" -#include "v8.h" - -#include -#include -#include namespace node { -using v8::Array; using v8::ArrayBuffer; using v8::Boolean; using v8::Context; -using v8::External; -using v8::Function; -using v8::FunctionCallbackInfo; -using v8::FunctionTemplate; -using v8::Handle; -using v8::HandleScope; using v8::Integer; -using v8::Isolate; -using v8::Local; -using v8::Name; -using v8::Object; -using v8::String; -using v8::Value; namespace http2 { diff --git a/src/node_http2.h b/src/node_http2.h index dcf3837b09..9280f52bb5 100755 --- a/src/node_http2.h +++ b/src/node_http2.h @@ -3,48 +3,17 @@ #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS -#include "node.h" -#include "nghttp2/nghttp2.h" -#include "uv.h" - -#include "node_http2_core.h" #include "node_http2_core-inl.h" -#include "env.h" -#include "env-inl.h" -#include "node_crypto_bio.h" -#include "stream_base.h" #include "stream_base-inl.h" #include "string_bytes.h" -#include "util.h" -#include "util-inl.h" -#include "v8.h" - -#include "vector" -#include "map" -#include "memory" namespace node { namespace http2 { using v8::Array; -using v8::Context; using v8::EscapableHandleScope; -using v8::Exception; -using v8::External; -using v8::External; -using v8::Function; -using v8::FunctionCallbackInfo; -using v8::HandleScope; -using v8::Integer; using v8::Isolate; -using v8::Local; -using v8::Map; using v8::MaybeLocal; -using v8::Name; -using v8::Object; -using v8::Persistent; -using v8::String; -using v8::Value; #define HTTP_KNOWN_HEADERS(V) \ V(STATUS, ":status") \ diff --git a/src/node_http2_core-inl.h b/src/node_http2_core-inl.h index d926cb9de8..a02378f8c6 100755 --- a/src/node_http2_core-inl.h +++ b/src/node_http2_core-inl.h @@ -5,14 +5,8 @@ #include "node_http2_core.h" #include "node_internals.h" // arraysize -#include "util.h" -#include "util-inl.h" #include "freelist.h" -#include "uv.h" -#include "nghttp2/nghttp2.h" -#include - namespace node { namespace http2 { diff --git a/src/node_http2_core.cc b/src/node_http2_core.cc index 0bb66f7070..adbe09388d 100644 --- a/src/node_http2_core.cc +++ b/src/node_http2_core.cc @@ -1,4 +1,3 @@ -#include "node_http2_core.h" #include "node_http2_core-inl.h" namespace node { diff --git a/src/node_http2_core.h b/src/node_http2_core.h index 4769e599d8..af11060746 100755 --- a/src/node_http2_core.h +++ b/src/node_http2_core.h @@ -9,8 +9,6 @@ #include "nghttp2/nghttp2.h" #include -#include -#include namespace node { namespace http2 {