fixed Resolver::DoArrayResolve after bug 1352 fix
authorJaume Nin <jnin@cttc.es>
Fri, 11 May 2012 14:02:54 +0200
changeset 8748 87a141a38088
parent 7885 92405ffdac3a
child 8749 4462ac63d4cf
fixed Resolver::DoArrayResolve after bug 1352 fix
src/core/model/config.cc
--- a/src/core/model/config.cc	Thu May 10 12:30:23 2012 -0700
+++ b/src/core/model/config.cc	Fri May 11 14:02:54 2012 +0200
@@ -431,7 +431,7 @@
 }
 
 void 
-Resolver::DoArrayResolve (std::string path, const ObjectPtrContainerValue &vector)
+Resolver::DoArrayResolve (std::string path, const ObjectPtrContainerValue &container)
 {
   NS_LOG_FUNCTION(this << path);
   NS_ASSERT (path != "");
@@ -445,14 +445,15 @@
   std::string pathLeft = path.substr (next, path.size ()-next);
 
   ArrayMatcher matcher = ArrayMatcher (item);
-  for (uint32_t i = 0; i < vector.GetN (); i++)
+  ObjectPtrContainerValue::Iterator it;
+  for (it = container.Begin (); it != container.End (); ++it)
     {
-      if (matcher.Matches (i))
+      if (matcher.Matches ((*it).first))
         {
           std::ostringstream oss;
-          oss << i;
+          oss << (*it).first;
           m_workStack.push_back (oss.str ());
-          DoResolve (pathLeft, vector.Get (i));
+          DoResolve (pathLeft, (*it).second);
           m_workStack.pop_back ();
         }
     }