use a Ptr<> where needed.
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Fri, 24 Aug 2007 12:45:45 +0200
changeset 1293 a6761bd6b649
parent 1292 85a0ebaad0a1
child 1294 b59fb36ab86a
child 1882 061f7f7f9992
use a Ptr<> where needed.
src/mobility/mobility-model.cc
src/mobility/mobility-model.h
--- a/src/mobility/mobility-model.cc	Fri Aug 24 10:33:58 2007 +0200
+++ b/src/mobility/mobility-model.cc	Fri Aug 24 12:45:45 2007 +0200
@@ -52,9 +52,9 @@
 }
 
 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);
 }
--- a/src/mobility/mobility-model.h	Fri Aug 24 10:33:58 2007 +0200
+++ b/src/mobility/mobility-model.h	Fri Aug 24 12:45:45 2007 +0200
@@ -57,7 +57,7 @@
    * \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