From c1664a9008a426f40555fe561d9a6234c6124f43 Mon Sep 17 00:00:00 2001 From: Yash Ladha Date: Mon, 1 Jun 2020 11:29:52 +0530 Subject: [PATCH] src: clang_format base_object PR-URL: https://github.com/nodejs/node/pull/33680 Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: David Carlier Reviewed-By: James M Snell --- src/base_object.h | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/base_object.h b/src/base_object.h index 61e5d0cff97174..5ea2ea57d874f5 100644 --- a/src/base_object.h +++ b/src/base_object.h @@ -24,9 +24,9 @@ #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS +#include // std::remove_reference #include "memory_tracker.h" #include "v8.h" -#include // std::remove_reference namespace node { @@ -88,7 +88,7 @@ class BaseObject : public MemoryRetainer { template static void InternalFieldGet(v8::Local property, const v8::PropertyCallbackInfo& info); - template + template static void InternalFieldSet(v8::Local property, v8::Local value, const v8::PropertyCallbackInfo& info); @@ -205,13 +205,11 @@ inline T* Unwrap(v8::Local obj) { return BaseObject::FromJSObject(obj); } - -#define ASSIGN_OR_RETURN_UNWRAP(ptr, obj, ...) \ - do { \ - *ptr = static_cast::type>( \ - BaseObject::FromJSObject(obj)); \ - if (*ptr == nullptr) \ - return __VA_ARGS__; \ +#define ASSIGN_OR_RETURN_UNWRAP(ptr, obj, ...) \ + do { \ + *ptr = static_cast::type>( \ + BaseObject::FromJSObject(obj)); \ + if (*ptr == nullptr) return __VA_ARGS__; \ } while (0) // Implementation of a generic strong or weak pointer to a BaseObject. @@ -252,7 +250,7 @@ class BaseObjectPtrImpl final { private: union { - BaseObject* target; // Used for strong pointers. + BaseObject* target; // Used for strong pointers. BaseObject::PointerData* pointer_data; // Used for weak pointers. } data_;