From 2b1100c87831e8af5f64fba7f7b4d25ab6da4f70 Mon Sep 17 00:00:00 2001 From: Hennadii Chernyshchyk Date: Sun, 19 Sep 2021 20:54:34 +0300 Subject: [PATCH] Use default initialization { 0 } initializes only first element with zero explicitly and other elements with their default value (zeros too). Technically it will work the same, but will be more correct. --- binding_generator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/binding_generator.py b/binding_generator.py index 22ba8ba..dad8a48 100644 --- a/binding_generator.py +++ b/binding_generator.py @@ -238,7 +238,7 @@ def generate_builtin_class_header(builtin_api, size, used_classes, fully_used_cl result.append(f"class {class_name} {{") result.append(f"\tstatic constexpr size_t {snake_class_name}_SIZE = {size};") - result.append(f"\tuint8_t opaque[{snake_class_name}_SIZE] {{ 0 }};") + result.append(f"\tuint8_t opaque[{snake_class_name}_SIZE] = {{}};") result.append( f"\t_FORCE_INLINE_ GDNativeTypePtr ptr() const {{ return const_cast(&opaque); }}" )