@@ -2475,7 +2475,7 @@ inline ClassPropertyDescriptor<T> ObjectWrap<T>::StaticMethod(
2475
2475
// TODO: Delete when the class is destroyed
2476
2476
StaticVoidMethodCallbackData* callbackData = new StaticVoidMethodCallbackData ({ method, data });
2477
2477
2478
- napi_property_descriptor desc = {} ;
2478
+ napi_property_descriptor desc = napi_property_descriptor () ;
2479
2479
desc.utf8name = utf8name;
2480
2480
desc.method = T::StaticVoidMethodCallbackWrapper;
2481
2481
desc.data = callbackData;
@@ -2492,7 +2492,7 @@ inline ClassPropertyDescriptor<T> ObjectWrap<T>::StaticMethod(
2492
2492
// TODO: Delete when the class is destroyed
2493
2493
StaticMethodCallbackData* callbackData = new StaticMethodCallbackData ({ method, data });
2494
2494
2495
- napi_property_descriptor desc = {} ;
2495
+ napi_property_descriptor desc = napi_property_descriptor () ;
2496
2496
desc.utf8name = utf8name;
2497
2497
desc.method = T::StaticMethodCallbackWrapper;
2498
2498
desc.data = callbackData;
@@ -2511,7 +2511,7 @@ inline ClassPropertyDescriptor<T> ObjectWrap<T>::StaticAccessor(
2511
2511
StaticAccessorCallbackData* callbackData =
2512
2512
new StaticAccessorCallbackData ({ getter, setter, data });
2513
2513
2514
- napi_property_descriptor desc = {} ;
2514
+ napi_property_descriptor desc = napi_property_descriptor () ;
2515
2515
desc.utf8name = utf8name;
2516
2516
desc.getter = getter != nullptr ? T::StaticGetterCallbackWrapper : nullptr ;
2517
2517
desc.setter = setter != nullptr ? T::StaticSetterCallbackWrapper : nullptr ;
@@ -2530,7 +2530,7 @@ inline ClassPropertyDescriptor<T> ObjectWrap<T>::InstanceMethod(
2530
2530
InstanceVoidMethodCallbackData* callbackData =
2531
2531
new InstanceVoidMethodCallbackData ({ method, data});
2532
2532
2533
- napi_property_descriptor desc = {} ;
2533
+ napi_property_descriptor desc = napi_property_descriptor () ;
2534
2534
desc.utf8name = utf8name;
2535
2535
desc.method = T::InstanceVoidMethodCallbackWrapper;
2536
2536
desc.data = callbackData;
@@ -2547,7 +2547,7 @@ inline ClassPropertyDescriptor<T> ObjectWrap<T>::InstanceMethod(
2547
2547
// TODO: Delete when the class is destroyed
2548
2548
InstanceMethodCallbackData* callbackData = new InstanceMethodCallbackData ({ method, data });
2549
2549
2550
- napi_property_descriptor desc = {} ;
2550
+ napi_property_descriptor desc = napi_property_descriptor () ;
2551
2551
desc.utf8name = utf8name;
2552
2552
desc.method = T::InstanceMethodCallbackWrapper;
2553
2553
desc.data = callbackData;
@@ -2565,7 +2565,7 @@ inline ClassPropertyDescriptor<T> ObjectWrap<T>::InstanceMethod(
2565
2565
InstanceVoidMethodCallbackData* callbackData =
2566
2566
new InstanceVoidMethodCallbackData ({ method, data});
2567
2567
2568
- napi_property_descriptor desc = {} ;
2568
+ napi_property_descriptor desc = napi_property_descriptor () ;
2569
2569
desc.name = name;
2570
2570
desc.method = T::InstanceVoidMethodCallbackWrapper;
2571
2571
desc.data = callbackData;
@@ -2582,7 +2582,7 @@ inline ClassPropertyDescriptor<T> ObjectWrap<T>::InstanceMethod(
2582
2582
// TODO: Delete when the class is destroyed
2583
2583
InstanceMethodCallbackData* callbackData = new InstanceMethodCallbackData ({ method, data });
2584
2584
2585
- napi_property_descriptor desc = {} ;
2585
+ napi_property_descriptor desc = napi_property_descriptor () ;
2586
2586
desc.name = name;
2587
2587
desc.method = T::InstanceMethodCallbackWrapper;
2588
2588
desc.data = callbackData;
@@ -2601,7 +2601,7 @@ inline ClassPropertyDescriptor<T> ObjectWrap<T>::InstanceAccessor(
2601
2601
InstanceAccessorCallbackData* callbackData =
2602
2602
new InstanceAccessorCallbackData ({ getter, setter, data });
2603
2603
2604
- napi_property_descriptor desc = {} ;
2604
+ napi_property_descriptor desc = napi_property_descriptor () ;
2605
2605
desc.utf8name = utf8name;
2606
2606
desc.getter = getter != nullptr ? T::InstanceGetterCallbackWrapper : nullptr ;
2607
2607
desc.setter = setter != nullptr ? T::InstanceSetterCallbackWrapper : nullptr ;
@@ -2613,7 +2613,7 @@ inline ClassPropertyDescriptor<T> ObjectWrap<T>::InstanceAccessor(
2613
2613
template <typename T>
2614
2614
inline ClassPropertyDescriptor<T> ObjectWrap<T>::StaticValue(const char * utf8name,
2615
2615
Napi::Value value, napi_property_attributes attributes) {
2616
- napi_property_descriptor desc = {} ;
2616
+ napi_property_descriptor desc = napi_property_descriptor () ;
2617
2617
desc.utf8name = utf8name;
2618
2618
desc.value = value;
2619
2619
desc.attributes = static_cast <napi_property_attributes>(attributes | napi_static);
@@ -2625,7 +2625,7 @@ inline ClassPropertyDescriptor<T> ObjectWrap<T>::InstanceValue(
2625
2625
const char * utf8name,
2626
2626
Napi::Value value,
2627
2627
napi_property_attributes attributes) {
2628
- napi_property_descriptor desc = {} ;
2628
+ napi_property_descriptor desc = napi_property_descriptor () ;
2629
2629
desc.utf8name = utf8name;
2630
2630
desc.value = value;
2631
2631
desc.attributes = attributes;
0 commit comments