diff --git a/src/helper/olsr-helper.cc b/src/helper/olsr-helper.cc index f7b475362..f27cb08c7 100644 --- a/src/helper/olsr-helper.cc +++ b/src/helper/olsr-helper.cc @@ -34,7 +34,11 @@ OlsrHelper::SetAgent (std::string tid, void OlsrHelper::Enable (NodeContainer container) { - Enable (container.Begin (), container.End ()); + for (NodeContainer::Iterator i = container.Begin (); i != container.End (); ++i) + { + Ptr node = *i; + Enable (node); + } } void OlsrHelper::Enable (Ptr node) @@ -47,7 +51,7 @@ OlsrHelper::Enable (Ptr node) void OlsrHelper::EnableAll (void) { - Enable (NodeList::Begin (), NodeList::End ()); + Enable (NodeContainer::GetGlobal ()); } } // namespace ns3 diff --git a/src/helper/olsr-helper.h b/src/helper/olsr-helper.h index 462766cde..80df120af 100644 --- a/src/helper/olsr-helper.h +++ b/src/helper/olsr-helper.h @@ -22,8 +22,6 @@ public: std::string n6 = "", Attribute v6 = Attribute (), std::string n7 = "", Attribute v7 = Attribute ()); - template - void Enable (InputIterator begin, InputIterator end); void Enable (NodeContainer container); void Enable (Ptr node); void EnableAll (void); @@ -33,20 +31,4 @@ private: } // namespace ns3 -namespace ns3 { - -template -void -OlsrHelper::Enable (T begin, T end) -{ - for (T i = begin; i != end; i++) - { - Ptr obj = (*i); - Ptr node = obj->GetObject (); - Enable (node); - } -} - -} // namespace ns3 - #endif /* OLSR_HELPER_H */