COIN-OR::LEMON - Graph Library

Changeset 1649:95c8cd25a456 in lemon-0.x for gui


Ignore:
Timestamp:
08/26/05 12:46:51 (14 years ago)
Author:
Akos Ladanyi
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2162
Message:

bugfix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gui/mapstorage.cc

    r1646 r1649  
    246246    else
    247247    {
    248       EdgeIt e(graph);
    249       double max = (*edgemap_storage["id"])[e];
    250       for (; e != INVALID; ++e)
     248      double max = std::numeric_limits<double>::min();
     249      for (EdgeIt e(graph); e != INVALID; ++e)
    251250      {
    252251        if ((*edgemap_storage["id"])[e] > max)
    253252          max = (*edgemap_storage["id"])[e];
    254253      }
    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;
    256258    }
    257259  }
Note: See TracChangeset for help on using the changeset viewer.