From 003fb2697b9803b556e5024a87102a0184d781de Mon Sep 17 00:00:00 2001 From: Kp Date: Sat, 1 Feb 2020 22:33:31 +0000 Subject: [PATCH] Use uint8_t for morph_data::n_submodels_active The array it controls is only 10 elements long. uint8_t can easily represent all valid indices. --- common/main/morph.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/main/morph.h b/common/main/morph.h index 38b466bb0..ec228458d 100644 --- a/common/main/morph.h +++ b/common/main/morph.h @@ -45,12 +45,12 @@ struct morph_data : prohibit_void_ptr { MAX_VECS = 5000, }; - object *obj; // object which is morphing - int n_submodels_active; + object *obj = nullptr; // object which is morphing + uint8_t n_submodels_active; uint8_t morph_save_control_type; uint8_t morph_save_movement_type; - physics_info morph_save_phys_info; object_signature_t Morph_sig; + physics_info morph_save_phys_info; array morph_vecs, morph_deltas; array morph_times; array submodel_active, // which submodels are active