Skip to content

Commit 28b58b5

Browse files
committed
src: replace template<template <
PR-URL: #20675 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent 7bff6d1 commit 28b58b5

9 files changed

+17
-17
lines changed

src/cares_wrap.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,7 @@ class QueryWrap : public AsyncWrap {
722722
};
723723

724724

725-
template<typename T>
725+
template <typename T>
726726
Local<Array> AddrTTLToArray(Environment* env,
727727
const T* addrttls,
728728
size_t naddrttls) {

src/inspector_io.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ using AsyncAndAgent = std::pair<uv_async_t, Agent*>;
2323
using v8_inspector::StringBuffer;
2424
using v8_inspector::StringView;
2525

26-
template<typename Transport>
26+
template <typename Transport>
2727
using TransportAndIo = std::pair<Transport*, InspectorIo*>;
2828

2929
std::string ScriptPath(uv_loop_t* loop, const std::string& script_name) {
@@ -284,7 +284,7 @@ void InspectorIo::IoThreadAsyncCb(uv_async_t* async) {
284284
}
285285
}
286286

287-
template<typename Transport>
287+
template <typename Transport>
288288
void InspectorIo::ThreadMain() {
289289
uv_loop_t loop;
290290
loop.data = nullptr;

src/inspector_js_api.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ static void* GetAsyncTask(int64_t asyncId) {
194194
return reinterpret_cast<void*>(asyncId << 1);
195195
}
196196

197-
template<void (Agent::*asyncTaskFn)(void*)>
197+
template <void (Agent::*asyncTaskFn)(void*)>
198198
static void InvokeAsyncTaskFnWithId(const FunctionCallbackInfo<Value>& args) {
199199
Environment* env = Environment::GetCurrent(args);
200200
CHECK(args[0]->IsNumber());

src/inspector_socket_server.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ class ServerSocket {
261261
private:
262262
explicit ServerSocket(InspectorSocketServer* server)
263263
: tcp_socket_(uv_tcp_t()), server_(server), port_(-1) {}
264-
template<typename UvHandle>
264+
template <typename UvHandle>
265265
static ServerSocket* FromTcpSocket(UvHandle* socket) {
266266
return node::ContainerOf(&ServerSocket::tcp_socket_,
267267
reinterpret_cast<uv_tcp_t*>(socket));

src/module_wrap.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ enum ResolveExtensionsOptions {
548548
ONLY_VIA_EXTENSIONS
549549
};
550550

551-
template<ResolveExtensionsOptions options>
551+
template <ResolveExtensionsOptions options>
552552
Maybe<URL> ResolveExtensions(const URL& search) {
553553
if (options == TRY_EXACT_NAME) {
554554
std::string filePath = search.ToFilePath();

src/node_http2.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1222,7 +1222,7 @@ class ExternalHeader :
12221222
vec.len);
12231223
}
12241224

1225-
template<bool may_internalize>
1225+
template <bool may_internalize>
12261226
static MaybeLocal<String> New(Environment* env, nghttp2_rcbuf* buf) {
12271227
if (nghttp2_rcbuf_is_static(buf)) {
12281228
auto& static_str_map = env->isolate_data()->http2_static_strs;

src/node_url.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -988,7 +988,7 @@ void URLHost::ParseHost(const char* input,
988988

989989
// Locates the longest sequence of 0 segments in an IPv6 address
990990
// in order to use the :: compression when serializing
991-
template<typename T>
991+
template <typename T>
992992
inline T* FindLongestZeroSequence(T* values, size_t len) {
993993
T* start = values;
994994
T* end = start + len;

src/util.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ struct OnScopeLeave {
420420
};
421421

422422
// Simple RAII wrapper for contiguous data that uses malloc()/free().
423-
template<typename T>
423+
template <typename T>
424424
struct MallocedBuffer {
425425
T* data;
426426
size_t size;
@@ -448,10 +448,10 @@ struct MallocedBuffer {
448448
};
449449

450450
// Test whether some value can be called with ().
451-
template<typename T, typename = void>
451+
template <typename T, typename = void>
452452
struct is_callable : std::is_function<T> { };
453453

454-
template<typename T>
454+
template <typename T>
455455
struct is_callable<T, typename std::enable_if<
456456
std::is_same<decltype(void(&T::operator())), void>::value
457457
>::type> : std::true_type { };

test/cctest/test_aliased_buffer.cc

+6-6
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ using node::AliasedBuffer;
77

88
class AliasBufferTest : public NodeTestFixture {};
99

10-
template<class NativeT>
10+
template <class NativeT>
1111
void CreateOracleValues(std::vector<NativeT>* buf) {
1212
for (size_t i = 0, j = buf->size(); i < buf->size(); i++, j--) {
1313
(*buf)[i] = static_cast<NativeT>(j);
1414
}
1515
}
1616

17-
template<class NativeT, class V8T>
17+
template <class NativeT, class V8T>
1818
void WriteViaOperator(AliasedBuffer<NativeT, V8T>* aliasedBuffer,
1919
const std::vector<NativeT>& oracle) {
2020
// write through the API
@@ -23,7 +23,7 @@ void WriteViaOperator(AliasedBuffer<NativeT, V8T>* aliasedBuffer,
2323
}
2424
}
2525

26-
template<class NativeT, class V8T>
26+
template <class NativeT, class V8T>
2727
void WriteViaSetValue(AliasedBuffer<NativeT, V8T>* aliasedBuffer,
2828
const std::vector<NativeT>& oracle) {
2929
// write through the API
@@ -32,7 +32,7 @@ void WriteViaSetValue(AliasedBuffer<NativeT, V8T>* aliasedBuffer,
3232
}
3333
}
3434

35-
template<class NativeT, class V8T>
35+
template <class NativeT, class V8T>
3636
void ReadAndValidate(v8::Isolate* isolate,
3737
v8::Local<v8::Context> context,
3838
AliasedBuffer<NativeT, V8T>* aliasedBuffer,
@@ -68,7 +68,7 @@ void ReadAndValidate(v8::Isolate* isolate,
6868
}
6969
}
7070

71-
template<class NativeT, class V8T>
71+
template <class NativeT, class V8T>
7272
void ReadWriteTest(v8::Isolate* isolate) {
7373
v8::Isolate::Scope isolate_scope(isolate);
7474
v8::HandleScope handle_scope(isolate);
@@ -92,7 +92,7 @@ void ReadWriteTest(v8::Isolate* isolate) {
9292
ReadAndValidate(isolate, context, &ab, oracle);
9393
}
9494

95-
template<
95+
template <
9696
class NativeT_A, class V8T_A,
9797
class NativeT_B, class V8T_B,
9898
class NativeT_C, class V8T_C>

0 commit comments

Comments
 (0)