gui/mapstorage.cc
changeset 1654 0917756ba533
parent 1646 2dd083dded66
child 1686 a5b8e0fde2be
equal deleted inserted replaced
13:cd4f70e29cfe 14:ebe41893e2fd
   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 }