use a Ptr<> where needed.
This commit is contained in:
@@ -52,9 +52,9 @@ MobilityModel::Set (const Position &position)
|
||||
}
|
||||
|
||||
double
|
||||
MobilityModel::GetDistanceFrom (const MobilityModel &other) const
|
||||
MobilityModel::GetDistanceFrom (Ptr<const MobilityModel> other) const
|
||||
{
|
||||
Position oPosition = other.DoGet ();
|
||||
Position oPosition = other->DoGet ();
|
||||
Position position = DoGet ();
|
||||
return CalculateDistance (position, oPosition);
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
* \param position a reference to another mobility model
|
||||
* \returns the distance between the two objects. Unit is meters.
|
||||
*/
|
||||
double GetDistanceFrom (const MobilityModel &position) const;
|
||||
double GetDistanceFrom (Ptr<const MobilityModel> position) const;
|
||||
protected:
|
||||
/**
|
||||
* Must be invoked by subclasses when the course of the
|
||||
|
||||
Reference in New Issue
Block a user