From 5e90d27b76a55d78ad804c074ab552f3d32acc2e Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=B4me=20Chilliet?= Date: Mon, 2 Jan 2017 00:40:39 +0100 Subject: [PATCH] Using initialization list in Muscle constructor --- Source/Animation/Muscle.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Source/Animation/Muscle.cpp b/Source/Animation/Muscle.cpp index 4485c5e..da8c64c 100644 --- a/Source/Animation/Muscle.cpp +++ b/Source/Animation/Muscle.cpp @@ -25,22 +25,22 @@ along with Lugaru. If not, see . extern float multiplier; extern bool freeze; -Muscle::Muscle() +Muscle::Muscle() : + length(0), + targetlength(0), + parent1(0), + parent2(0), + maxlength(0), + minlength(0), + type(boneconnect), + visible(false), + rotate1(0), rotate2(0), rotate3(0), + lastrotate1(0), lastrotate2(0), lastrotate3(0), + oldrotate1(0), oldrotate2(0), oldrotate3(0), + newrotate1(0), newrotate2(0), newrotate3(0), + + strength(0) { - length = 0; - targetlength = 0; - parent1 = 0; - parent2 = 0; - maxlength = 0; - minlength = 0; - type = boneconnect; - visible = 0; - rotate1 = 0, rotate2 = 0, rotate3 = 0; - lastrotate1 = 0, lastrotate2 = 0, lastrotate3 = 0; - oldrotate1 = 0, oldrotate2 = 0, oldrotate3 = 0; - newrotate1 = 0, newrotate2 = 0, newrotate3 = 0; - - strength = 0; } void Muscle::load(FILE* tfile, int vertexNum, std::vector& joints) -- 2.39.2