From 8054c3398288f7c892f8d78074ef088b9ce16f0c Mon Sep 17 00:00:00 2001 From: Oleh Derevenko Date: Sat, 10 Nov 2018 03:28:40 +0200 Subject: [PATCH] Cosmetic: memcpy() was replaced with an assignemt operator invocation --- ode/src/ode.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ode/src/ode.cpp b/ode/src/ode.cpp index 877e0d6c..40bfd6ac 100644 --- a/ode/src/ode.cpp +++ b/ode/src/ode.cpp @@ -494,7 +494,7 @@ void dBodySetMass (dBodyID b, const dMass *mass) fabs( mass->c[1] ) <= dEpsilon && fabs( mass->c[2] ) <= dEpsilon, "The centre of mass must be at the origin." ); - memcpy (&b->mass,mass,sizeof(dMass)); + b->mass = *mass; if (dInvertPDMatrix (b->mass.I,b->invI,3,NULL)==0) { dDEBUGMSG ("inertia must be positive definite!"); dRSetIdentity (b->invI); @@ -506,7 +506,7 @@ void dBodySetMass (dBodyID b, const dMass *mass) void dBodyGetMass (dBodyID b, dMass *mass) { dAASSERT (b && mass); - memcpy (mass,&b->mass,sizeof(dMass)); + *mass = b->mass; } -- 2.11.4.GIT