From 2841599b12f732c4bcfc8a325e727d5c3bf8a9c7 Mon Sep 17 00:00:00 2001 From: Henning Stahlke Date: Wed, 17 Jan 2018 21:20:55 +0100 Subject: [PATCH] add const to argument --- src/FDM/YASim/RigidBody.cpp | 4 ++-- src/FDM/YASim/RigidBody.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/FDM/YASim/RigidBody.cpp b/src/FDM/YASim/RigidBody.cpp index bf635ab16..f3b500a19 100644 --- a/src/FDM/YASim/RigidBody.cpp +++ b/src/FDM/YASim/RigidBody.cpp @@ -22,7 +22,7 @@ RigidBody::~RigidBody() /// add new point mass to body /// isStatic: set to true for masses that do not change per iteration (everything but fuel?) -int RigidBody::addMass(float mass, float* pos, bool isStatic) +int RigidBody::addMass(float mass, const float* pos, bool isStatic) { // If out of space, reallocate twice as much if(_nMasses == _massesAlloced) { @@ -211,7 +211,7 @@ void RigidBody::addForce(const float* pos, const float* force) addTorque(t); } -void RigidBody::getAccel(float* pos, float* accelOut) const +void RigidBody::getAccel(const float* pos, float* accelOut) const { getAccel(accelOut); diff --git a/src/FDM/YASim/RigidBody.hpp b/src/FDM/YASim/RigidBody.hpp index dbabcd661..5a61c875a 100644 --- a/src/FDM/YASim/RigidBody.hpp +++ b/src/FDM/YASim/RigidBody.hpp @@ -30,7 +30,7 @@ public: // Adds a point mass to the system. Returns a handle so the gyro // can be later modified via setMass(). - int addMass(float mass, float* pos, bool isStatic = false); + int addMass(float mass, const float* pos, bool isStatic = false); // Modifies a previously-added point mass (fuel tank running dry, // gear going up, swing wing swinging, pilot bailing out, etc...) @@ -94,7 +94,7 @@ public: // coordinates. If the body is rotating, this will be different // from the c.g. acceleration due to the centripetal accelerations // of points not on the rotation axis. - void getAccel(float* pos, float* accelOut) const; + void getAccel(const float* pos, float* accelOut) const; // Returns the instantaneous rate of change of the angular // velocity, as a vector in local coordinates.