--- a/src/routing/global-routing/global-route-manager-impl.cc Fri Sep 04 18:02:03 2009 -0700
+++ b/src/routing/global-routing/global-route-manager-impl.cc Sat Sep 05 16:31:07 2009 -0700
@@ -406,7 +406,8 @@
GlobalRouteManagerImpl::DeleteGlobalRoutes ()
{
NS_LOG_FUNCTION_NOARGS ();
- for (NodeList::Iterator i = NodeList::Begin (); i != NodeList::End (); i++)
+ NodeList::Iterator listEnd = NodeList::End ();
+ for (NodeList::Iterator i = NodeList::Begin (); i != listEnd; i++)
{
Ptr<Node> node = *i;
Ptr<GlobalRouter> router = node->GetObject<GlobalRouter> ();
@@ -453,7 +454,8 @@
// Walk the list of nodes looking for the GlobalRouter Interface. Nodes with
// global router interfaces are, not too surprisingly, our routers.
//
- for (NodeList::Iterator i = NodeList::Begin (); i != NodeList::End (); i++)
+ NodeList::Iterator listEnd = NodeList::End ();
+ for (NodeList::Iterator i = NodeList::Begin (); i != listEnd; i++)
{
Ptr<Node> node = *i;
@@ -534,7 +536,8 @@
//
// Walk the list of nodes in the system.
//
- for (NodeList::Iterator i = NodeList::Begin (); i != NodeList::End (); i++)
+ NodeList::Iterator listEnd = NodeList::End ();
+ for (NodeList::Iterator i = NodeList::Begin (); i != listEnd; i++)
{
Ptr<Node> node = *i;
//
@@ -1351,7 +1354,8 @@
// the routing information to.
//
NodeList::Iterator i = NodeList::Begin ();
- for (; i != NodeList::End (); i++)
+ NodeList::Iterator listEnd = NodeList::End ();
+ for (; i != listEnd; i++)
{
Ptr<Node> node = *i;
//
@@ -1516,7 +1520,8 @@
// the routing information to.
//
NodeList::Iterator i = NodeList::Begin ();
- for (; i != NodeList::End (); i++)
+ NodeList::Iterator listEnd = NodeList::End ();
+ for (; i != listEnd; i++)
{
Ptr<Node> node = *i;
//
@@ -1637,7 +1642,8 @@
// building the routing table.
//
NodeList::Iterator i = NodeList::Begin ();
- for (; i != NodeList::End (); i++)
+ NodeList::Iterator listEnd = NodeList::End ();
+ for (; i != listEnd; i++)
{
Ptr<Node> node = *i;
@@ -1727,7 +1733,8 @@
// the routing information to.
//
NodeList::Iterator i = NodeList::Begin ();
- for (; i != NodeList::End (); i++)
+ NodeList::Iterator listEnd = NodeList::End ();
+ for (; i != listEnd; i++)
{
Ptr<Node> node = *i;
//
@@ -1867,7 +1874,8 @@
// the routing information to.
//
NodeList::Iterator i = NodeList::Begin ();
- for (; i != NodeList::End (); i++)
+ NodeList::Iterator listEnd = NodeList::End ();
+ for (; i != listEnd; i++)
{
Ptr<Node> node = *i;
//