src: replace template<
→ template <
PR-URL: https://github.com/nodejs/node/pull/20675 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
parent
12b0159adf
commit
bd6dc9ebab
@ -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) {
|
||||
|
@ -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;
|
||||
|
@ -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());
|
||||
|
@ -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));
|
||||
|
@ -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();
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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 { };
|
||||
|
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user