summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cares_wrap.cc2
-rw-r--r--src/inspector_io.cc4
-rw-r--r--src/inspector_js_api.cc2
-rw-r--r--src/inspector_socket_server.cc2
-rw-r--r--src/module_wrap.cc2
-rw-r--r--src/node_http2.h2
-rw-r--r--src/node_url.cc2
-rw-r--r--src/util.h6
-rw-r--r--test/cctest/test_aliased_buffer.cc12
9 files changed, 17 insertions, 17 deletions
diff --git a/src/cares_wrap.cc b/src/cares_wrap.cc
index f829eb2b01..24d424f732 100644
--- a/src/cares_wrap.cc
+++ b/src/cares_wrap.cc
@@ -722,7 +722,7 @@ class QueryWrap : public AsyncWrap {
};
-template<typename T>
+template <typename T>
Local<Array> AddrTTLToArray(Environment* env,
const T* addrttls,
size_t naddrttls) {
diff --git a/src/inspector_io.cc b/src/inspector_io.cc
index 38d88d7ab8..e6ceaf5b73 100644
--- a/src/inspector_io.cc
+++ b/src/inspector_io.cc
@@ -23,7 +23,7 @@ using AsyncAndAgent = std::pair<uv_async_t, Agent*>;
using v8_inspector::StringBuffer;
using v8_inspector::StringView;
-template<typename Transport>
+template <typename Transport>
using TransportAndIo = std::pair<Transport*, InspectorIo*>;
std::string ScriptPath(uv_loop_t* loop, const std::string& script_name) {
@@ -284,7 +284,7 @@ void InspectorIo::IoThreadAsyncCb(uv_async_t* async) {
}
}
-template<typename Transport>
+template <typename Transport>
void InspectorIo::ThreadMain() {
uv_loop_t loop;
loop.data = nullptr;
diff --git a/src/inspector_js_api.cc b/src/inspector_js_api.cc
index ae353defe8..802029ac4f 100644
--- a/src/inspector_js_api.cc
+++ b/src/inspector_js_api.cc
@@ -194,7 +194,7 @@ static void* GetAsyncTask(int64_t asyncId) {
return reinterpret_cast<void*>(asyncId << 1);
}
-template<void (Agent::*asyncTaskFn)(void*)>
+template <void (Agent::*asyncTaskFn)(void*)>
static void InvokeAsyncTaskFnWithId(const FunctionCallbackInfo<Value>& args) {
Environment* env = Environment::GetCurrent(args);
CHECK(args[0]->IsNumber());
diff --git a/src/inspector_socket_server.cc b/src/inspector_socket_server.cc
index e890f66a38..42082c9c84 100644
--- a/src/inspector_socket_server.cc
+++ b/src/inspector_socket_server.cc
@@ -261,7 +261,7 @@ class ServerSocket {
private:
explicit ServerSocket(InspectorSocketServer* server)
: tcp_socket_(uv_tcp_t()), server_(server), port_(-1) {}
- template<typename UvHandle>
+ template <typename UvHandle>
static ServerSocket* FromTcpSocket(UvHandle* socket) {
return node::ContainerOf(&ServerSocket::tcp_socket_,
reinterpret_cast<uv_tcp_t*>(socket));
diff --git a/src/module_wrap.cc b/src/module_wrap.cc
index 6e446c34fc..8bf08900c8 100644
--- a/src/module_wrap.cc
+++ b/src/module_wrap.cc
@@ -548,7 +548,7 @@ enum ResolveExtensionsOptions {
ONLY_VIA_EXTENSIONS
};
-template<ResolveExtensionsOptions options>
+template <ResolveExtensionsOptions options>
Maybe<URL> ResolveExtensions(const URL& search) {
if (options == TRY_EXACT_NAME) {
std::string filePath = search.ToFilePath();
diff --git a/src/node_http2.h b/src/node_http2.h
index f4ac926bb5..f473e30286 100644
--- a/src/node_http2.h
+++ b/src/node_http2.h
@@ -1222,7 +1222,7 @@ class ExternalHeader :
vec.len);
}
- template<bool may_internalize>
+ template <bool may_internalize>
static MaybeLocal<String> New(Environment* env, nghttp2_rcbuf* buf) {
if (nghttp2_rcbuf_is_static(buf)) {
auto& static_str_map = env->isolate_data()->http2_static_strs;
diff --git a/src/node_url.cc b/src/node_url.cc
index 09199afb14..42ecf47f4c 100644
--- a/src/node_url.cc
+++ b/src/node_url.cc
@@ -988,7 +988,7 @@ void URLHost::ParseHost(const char* input,
// Locates the longest sequence of 0 segments in an IPv6 address
// in order to use the :: compression when serializing
-template<typename T>
+template <typename T>
inline T* FindLongestZeroSequence(T* values, size_t len) {
T* start = values;
T* end = start + len;
diff --git a/src/util.h b/src/util.h
index 9595ee8f07..0e6fd5dd06 100644
--- a/src/util.h
+++ b/src/util.h
@@ -420,7 +420,7 @@ struct OnScopeLeave {
};
// Simple RAII wrapper for contiguous data that uses malloc()/free().
-template<typename T>
+template <typename T>
struct MallocedBuffer {
T* data;
size_t size;
@@ -448,10 +448,10 @@ struct MallocedBuffer {
};
// Test whether some value can be called with ().
-template<typename T, typename = void>
+template <typename T, typename = void>
struct is_callable : std::is_function<T> { };
-template<typename T>
+template <typename T>
struct is_callable<T, typename std::enable_if<
std::is_same<decltype(void(&T::operator())), void>::value
>::type> : std::true_type { };
diff --git a/test/cctest/test_aliased_buffer.cc b/test/cctest/test_aliased_buffer.cc
index b2f29d3b7c..bfbf7294db 100644
--- a/test/cctest/test_aliased_buffer.cc
+++ b/test/cctest/test_aliased_buffer.cc
@@ -7,14 +7,14 @@ using node::AliasedBuffer;
class AliasBufferTest : public NodeTestFixture {};
-template<class NativeT>
+template <class NativeT>
void CreateOracleValues(std::vector<NativeT>* buf) {
for (size_t i = 0, j = buf->size(); i < buf->size(); i++, j--) {
(*buf)[i] = static_cast<NativeT>(j);
}
}
-template<class NativeT, class V8T>
+template <class NativeT, class V8T>
void WriteViaOperator(AliasedBuffer<NativeT, V8T>* aliasedBuffer,
const std::vector<NativeT>& oracle) {
// write through the API
@@ -23,7 +23,7 @@ void WriteViaOperator(AliasedBuffer<NativeT, V8T>* aliasedBuffer,
}
}
-template<class NativeT, class V8T>
+template <class NativeT, class V8T>
void WriteViaSetValue(AliasedBuffer<NativeT, V8T>* aliasedBuffer,
const std::vector<NativeT>& oracle) {
// write through the API
@@ -32,7 +32,7 @@ void WriteViaSetValue(AliasedBuffer<NativeT, V8T>* aliasedBuffer,
}
}
-template<class NativeT, class V8T>
+template <class NativeT, class V8T>
void ReadAndValidate(v8::Isolate* isolate,
v8::Local<v8::Context> context,
AliasedBuffer<NativeT, V8T>* aliasedBuffer,
@@ -68,7 +68,7 @@ void ReadAndValidate(v8::Isolate* isolate,
}
}
-template<class NativeT, class V8T>
+template <class NativeT, class V8T>
void ReadWriteTest(v8::Isolate* isolate) {
v8::Isolate::Scope isolate_scope(isolate);
v8::HandleScope handle_scope(isolate);
@@ -92,7 +92,7 @@ void ReadWriteTest(v8::Isolate* isolate) {
ReadAndValidate(isolate, context, &ab, oracle);
}
-template<
+template <
class NativeT_A, class V8T_A,
class NativeT_B, class V8T_B,
class NativeT_C, class V8T_C>