From 9184fe71a9bcfd77f6831323cbea724cf8f35f51 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 15 Sep 2014 14:39:11 +0000 Subject: [PATCH] vectors and matrices should be passed by reference. Fixes compile error on 32-bit windows --- panda/src/physx/physxActor.cxx | 2 +- panda/src/physx/physxActor.h | 2 +- panda/src/physx/physxBodyDesc.cxx | 4 ++-- panda/src/physx/physxBodyDesc.h | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/panda/src/physx/physxActor.cxx b/panda/src/physx/physxActor.cxx index 4c7ad866e2..996aea2245 100644 --- a/panda/src/physx/physxActor.cxx +++ b/panda/src/physx/physxActor.cxx @@ -163,7 +163,7 @@ get_name() const { // transform from the controller's transform. //////////////////////////////////////////////////////////////////// void PhysxActor:: -update_transform(const LMatrix4f m) { +update_transform(const LMatrix4f &m) { // Active transforms are update AFTER scene.fetchResults() has // been called, and thus can contain removed objects. So either diff --git a/panda/src/physx/physxActor.h b/panda/src/physx/physxActor.h index b9864d7e4f..b8bfa9773c 100644 --- a/panda/src/physx/physxActor.h +++ b/panda/src/physx/physxActor.h @@ -180,7 +180,7 @@ PUBLISHED: INLINE void ls(ostream &out, int indent_level=0) const; public: - void update_transform(const LMatrix4f m); + void update_transform(const LMatrix4f &m); //////////////////////////////////////////////////////////////////// PUBLISHED: diff --git a/panda/src/physx/physxBodyDesc.cxx b/panda/src/physx/physxBodyDesc.cxx index 59242ec53e..9dfbeca7a2 100644 --- a/panda/src/physx/physxBodyDesc.cxx +++ b/panda/src/physx/physxBodyDesc.cxx @@ -279,7 +279,7 @@ get_sleep_damping() const { // of mass. //////////////////////////////////////////////////////////////////// void PhysxBodyDesc:: -set_mass_local_mat(const LMatrix4f mat) { +set_mass_local_mat(const LMatrix4f &mat) { _desc.massLocalPose = PhysxManager::mat4_to_nxMat34(mat); } @@ -303,7 +303,7 @@ get_mass_local_mat() const { // bodies mass frame. //////////////////////////////////////////////////////////////////// void PhysxBodyDesc:: -set_mass_space_inertia(const LVector3f inertia) { +set_mass_space_inertia(const LVector3f &inertia) { _desc.massSpaceInertia = PhysxManager::vec3_to_nxVec3(inertia); } diff --git a/panda/src/physx/physxBodyDesc.h b/panda/src/physx/physxBodyDesc.h index b191c68e32..e4aca2ac23 100644 --- a/panda/src/physx/physxBodyDesc.h +++ b/panda/src/physx/physxBodyDesc.h @@ -46,8 +46,8 @@ PUBLISHED: void set_solver_iteration_count(unsigned int count); void set_sleep_energy_threshold(float threshold); void set_sleep_damping(float damping); - void set_mass_local_mat(const LMatrix4f mat); - void set_mass_space_inertia(const LVector3f inertia); + void set_mass_local_mat(const LMatrix4f &mat); + void set_mass_space_inertia(const LVector3f &inertia); void set_flag(PhysxBodyFlag flag, bool value); void set_ccd_motion_threshold(float threshold); void set_wake_up_counter(float value);