From: <mg...@us...> - 2009-07-02 12:01:29
|
Revision: 3886 http://planeshift.svn.sourceforge.net/planeshift/?rev=3886&view=rev Author: mgist Date: 2009-07-02 12:01:26 +0000 (Thu, 02 Jul 2009) Log Message: ----------- - Marked a few functions as const. Modified Paths: -------------- trunk/src/common/engine/linmove.cpp trunk/src/common/engine/linmove.h Modified: trunk/src/common/engine/linmove.cpp =================================================================== --- trunk/src/common/engine/linmove.cpp 2009-07-02 02:54:20 UTC (rev 3885) +++ trunk/src/common/engine/linmove.cpp 2009-07-02 12:01:26 UTC (rev 3886) @@ -866,7 +866,7 @@ } -iSector* psLinearMovement::GetSector () +iSector* psLinearMovement::GetSector () const { if ( mesh->GetMovable()->GetSectors()->GetCount() > 0 ) { @@ -890,7 +890,7 @@ #define DRDBG(x) -float psLinearMovement::GetYRotation () +float psLinearMovement::GetYRotation () const { // user will get a warning and a nothing if theres no mesh if (!mesh) return 0.0; @@ -898,13 +898,13 @@ ->GetTransform ().GetT2O (); return Matrix2YRot (transf); } -const csVector3 psLinearMovement::GetPosition () +const csVector3 psLinearMovement::GetPosition () const { // user will get a warning and a nothing if theres no mesh if (!mesh) return csVector3 (); return mesh->GetMovable ()->GetPosition (); } -const csVector3 psLinearMovement::GetFullPosition () +const csVector3 psLinearMovement::GetFullPosition () const { // user will get a warning and a nothing if theres no mesh if (!mesh) return csVector3 (); @@ -912,7 +912,7 @@ } void psLinearMovement::GetLastPosition (csVector3& pos, float& yrot, - iSector*& sector) + iSector*& sector) const { if (!mesh) return; Modified: trunk/src/common/engine/linmove.h =================================================================== --- trunk/src/common/engine/linmove.h 2009-07-02 02:54:20 UTC (rev 3885) +++ trunk/src/common/engine/linmove.h 2009-07-02 12:01:26 UTC (rev 3886) @@ -100,11 +100,11 @@ virtual void GetCDDimensions (csVector3& body, csVector3& legs, csVector3& shift); virtual void SetSpeed (float speedz); - virtual float GetYRotation (); - const csVector3 GetPosition (); - const csVector3 GetFullPosition (); + virtual float GetYRotation () const; + const csVector3 GetPosition () const; + const csVector3 GetFullPosition () const; - virtual void GetLastPosition (csVector3& pos, float& yrot, iSector*& sector); + virtual void GetLastPosition (csVector3& pos, float& yrot, iSector*& sector) const; virtual void GetLastFullPosition (csVector3& pos, float& yrot, iSector*& sector); virtual void SetPosition (const csVector3& pos, float yrot, const iSector* sector); virtual void SetFullPosition (const csVector3& pos, float yrot, const iSector* sector); @@ -161,7 +161,7 @@ virtual void TickEveryFrame (); - virtual iSector* GetSector (); + virtual iSector* GetSector () const; /** * This function actually moves and rotates the mesh, relighting This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |