gui/mapstorage.cc
changeset 1620 09feafe81053
parent 1606 dc4ea2010dee
child 1634 910b1bcb7d05
equal deleted inserted replaced
8:3419f352b331 9:d6bae6ca32a7
    72 }
    72 }
    73 
    73 
    74 double MapStorage::minOfNodeMap(const std::string & name)
    74 double MapStorage::minOfNodeMap(const std::string & name)
    75 {
    75 {
    76   NodeIt j(graph);
    76   NodeIt j(graph);
    77   double min=(*nodemap_storage[name])[j];
    77   double min;
       
    78   if(j!=INVALID)
       
    79     {
       
    80       min=(*nodemap_storage[name])[j];
       
    81     }
       
    82   else
       
    83     {
       
    84       min=0;
       
    85     }
    78   for (; j!=INVALID; ++j)
    86   for (; j!=INVALID; ++j)
    79   {
    87   {
    80     if( (*nodemap_storage[name])[j]<min )
    88     if( (*nodemap_storage[name])[j]<min )
    81     {
    89     {
    82       min=(*nodemap_storage[name])[j];
    90       min=(*nodemap_storage[name])[j];
    86 }
    94 }
    87 
    95 
    88 double MapStorage::minOfEdgeMap(const std::string & name)
    96 double MapStorage::minOfEdgeMap(const std::string & name)
    89 {
    97 {
    90   EdgeIt j(graph);
    98   EdgeIt j(graph);
    91   double min=(*edgemap_storage[name])[j];
    99   double min;
       
   100   if(j!=INVALID)
       
   101     {
       
   102       min=(*edgemap_storage[name])[j];
       
   103     }
       
   104   else
       
   105     {
       
   106       min=0;
       
   107     }
    92   for (EdgeIt j(graph); j!=INVALID; ++j)
   108   for (EdgeIt j(graph); j!=INVALID; ++j)
    93   {
   109   {
    94     if( (*edgemap_storage[name])[j]<min )
   110     if( (*edgemap_storage[name])[j]<min )
    95     {
   111     {
    96       min=(*edgemap_storage[name])[j];
   112       min=(*edgemap_storage[name])[j];