mapstorage.cc
branchgui
changeset 75 d5aadf09197b
parent 64 7a32d528857f
child 77 ba023627ff1a
equal deleted inserted replaced
13:14ad866888fd 14:89099480817f
   243     {
   243     {
   244       edgemap_default[it->first] = 0.0;
   244       edgemap_default[it->first] = 0.0;
   245     }
   245     }
   246     else
   246     else
   247     {
   247     {
   248       EdgeIt e(graph);
   248       double max = std::numeric_limits<double>::min();
   249       double max = (*edgemap_storage["id"])[e];
   249       for (EdgeIt e(graph); e != INVALID; ++e)
   250       for (; e != INVALID; ++e)
       
   251       {
   250       {
   252         if ((*edgemap_storage["id"])[e] > max)
   251         if ((*edgemap_storage["id"])[e] > max)
   253           max = (*edgemap_storage["id"])[e];
   252           max = (*edgemap_storage["id"])[e];
   254       }
   253       }
   255       edgemap_default["id"] = max + 1.0;
   254       if (max > std::numeric_limits<double>::min())
       
   255         edgemap_default["id"] = max + 1.0;
       
   256       else
       
   257         edgemap_default["id"] = 1.0;
   256     }
   258     }
   257   }
   259   }
   258 
   260 
   259   return 0;
   261   return 0;
   260 }
   262 }