1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Style: Partially apply clang-tidy's cppcoreguidelines-pro-type-member-init

Didn't commit all the changes where it wants to initialize a struct
with `{}`. Should be reviewed in a separate PR.

Option `IgnoreArrays` enabled for now to be conservative, can be
disabled to see if it proposes more useful changes.

Also fixed manually a handful of other missing initializations / moved
some from constructors.
This commit is contained in:
Rémi Verschelde
2022-05-02 16:28:25 +02:00
parent dd06cb90c5
commit c273ddc3ee
156 changed files with 749 additions and 951 deletions

View File

@@ -805,16 +805,16 @@ INDEXED_SETGET_STRUCT_TYPED(PackedColorArray, Color)
INDEXED_SETGET_STRUCT_DICT(Dictionary)
struct VariantIndexedSetterGetterInfo {
void (*setter)(Variant *base, int64_t index, const Variant *value, bool *valid, bool *oob);
void (*getter)(const Variant *base, int64_t index, Variant *value, bool *oob);
void (*setter)(Variant *base, int64_t index, const Variant *value, bool *valid, bool *oob) = nullptr;
void (*getter)(const Variant *base, int64_t index, Variant *value, bool *oob) = nullptr;
Variant::ValidatedIndexedSetter validated_setter;
Variant::ValidatedIndexedGetter validated_getter;
Variant::ValidatedIndexedSetter validated_setter = nullptr;
Variant::ValidatedIndexedGetter validated_getter = nullptr;
Variant::PTRIndexedSetter ptr_setter;
Variant::PTRIndexedGetter ptr_getter;
Variant::PTRIndexedSetter ptr_setter = nullptr;
Variant::PTRIndexedGetter ptr_getter = nullptr;
uint64_t (*get_indexed_size)(const Variant *base);
uint64_t (*get_indexed_size)(const Variant *base) = nullptr;
Variant::Type index_type;
@@ -1018,13 +1018,13 @@ struct VariantKeyedSetGetObject {
};
struct VariantKeyedSetterGetterInfo {
Variant::ValidatedKeyedSetter validated_setter;
Variant::ValidatedKeyedGetter validated_getter;
Variant::ValidatedKeyedChecker validated_checker;
Variant::ValidatedKeyedSetter validated_setter = nullptr;
Variant::ValidatedKeyedGetter validated_getter = nullptr;
Variant::ValidatedKeyedChecker validated_checker = nullptr;
Variant::PTRKeyedSetter ptr_setter;
Variant::PTRKeyedGetter ptr_getter;
Variant::PTRKeyedChecker ptr_checker;
Variant::PTRKeyedSetter ptr_setter = nullptr;
Variant::PTRKeyedGetter ptr_getter = nullptr;
Variant::PTRKeyedChecker ptr_checker = nullptr;
bool valid = false;
};