fix bug 122: get rid of duplicate argument to QueryInterface
This commit is contained in:
@@ -27,9 +27,9 @@ HierarchicalMobilityModel::HierarchicalMobilityModel (Ptr<MobilityModel> child,
|
||||
m_parent (parent)
|
||||
{
|
||||
Ptr<MobilityModelNotifier> childNotifier =
|
||||
m_child->QueryInterface<MobilityModelNotifier> (MobilityModelNotifier::iid);
|
||||
m_child->QueryInterface<MobilityModelNotifier> ();
|
||||
Ptr<MobilityModelNotifier> parentNotifier =
|
||||
m_parent->QueryInterface<MobilityModelNotifier> (MobilityModelNotifier::iid);
|
||||
m_parent->QueryInterface<MobilityModelNotifier> ();
|
||||
if (childNotifier == 0)
|
||||
{
|
||||
childNotifier = CreateObject<MobilityModelNotifier> ();
|
||||
|
||||
@@ -59,8 +59,7 @@ MobilityModel::GetDistanceFrom (Ptr<const MobilityModel> other) const
|
||||
void
|
||||
MobilityModel::NotifyCourseChange (void) const
|
||||
{
|
||||
Ptr<MobilityModelNotifier> notifier =
|
||||
QueryInterface<MobilityModelNotifier> (MobilityModelNotifier::iid);
|
||||
Ptr<MobilityModelNotifier> notifier = QueryInterface<MobilityModelNotifier> ();
|
||||
if (notifier != 0)
|
||||
{
|
||||
notifier->Notify (this);
|
||||
|
||||
@@ -49,8 +49,7 @@ Ns2MobilityFileTopology::GetMobilityModel (std::string idString, const ObjectSto
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
Ptr<StaticSpeedMobilityModel> model =
|
||||
object->QueryInterface<StaticSpeedMobilityModel> (StaticSpeedMobilityModel::iid);
|
||||
Ptr<StaticSpeedMobilityModel> model = object->QueryInterface<StaticSpeedMobilityModel> ();
|
||||
if (model == 0)
|
||||
{
|
||||
model = CreateObject<StaticSpeedMobilityModel> ();
|
||||
|
||||
Reference in New Issue
Block a user