Bug 1402498 - Mark two methods of AxisPhysicsModel as const. r?rhunt
MozReview-Commit-ID: BTL8YwAIHtu
--- a/gfx/layers/AxisPhysicsModel.cpp
+++ b/gfx/layers/AxisPhysicsModel.cpp
@@ -42,23 +42,23 @@ AxisPhysicsModel::AxisPhysicsModel(doubl
}
AxisPhysicsModel::~AxisPhysicsModel()
{
}
double
-AxisPhysicsModel::GetVelocity()
+AxisPhysicsModel::GetVelocity() const
{
return LinearInterpolate(mPrevState.v, mNextState.v, mProgress);
}
double
-AxisPhysicsModel::GetPosition()
+AxisPhysicsModel::GetPosition() const
{
return LinearInterpolate(mPrevState.p, mNextState.p, mProgress);
}
void
AxisPhysicsModel::SetVelocity(double aVelocity)
{
mNextState.v = aVelocity;
--- a/gfx/layers/AxisPhysicsModel.h
+++ b/gfx/layers/AxisPhysicsModel.h
@@ -32,27 +32,27 @@ public:
* Advance the physics simulation.
* |aDelta| is the time since the last sample.
*/
void Simulate(const TimeDuration& aDeltaTime);
/**
* Gets the raw velocity of this axis at this moment.
*/
- double GetVelocity();
+ double GetVelocity() const;
/**
* Sets the raw velocity of this axis at this moment.
*/
void SetVelocity(double aVelocity);
/**
* Gets the raw position of this axis at this moment.
*/
- double GetPosition();
+ double GetPosition() const;
/**
* Sets the raw position of this axis at this moment.
*/
void SetPosition(double aPosition);
protected: