[Lemon-commits] [lemon_svn] ladanyi: r2162 - hugo/trunk/gui
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:50:37 CET 2006
Author: ladanyi
Date: Fri Aug 26 12:46:51 2005
New Revision: 2162
Modified:
hugo/trunk/gui/mapstorage.cc
Log:
bugfix
Modified: hugo/trunk/gui/mapstorage.cc
==============================================================================
--- hugo/trunk/gui/mapstorage.cc (original)
+++ hugo/trunk/gui/mapstorage.cc Fri Aug 26 12:46:51 2005
@@ -245,14 +245,16 @@
}
else
{
- EdgeIt e(graph);
- double max = (*edgemap_storage["id"])[e];
- for (; e != INVALID; ++e)
+ double max = std::numeric_limits<double>::min();
+ for (EdgeIt e(graph); e != INVALID; ++e)
{
if ((*edgemap_storage["id"])[e] > max)
max = (*edgemap_storage["id"])[e];
}
- edgemap_default["id"] = max + 1.0;
+ if (max > std::numeric_limits<double>::min())
+ edgemap_default["id"] = max + 1.0;
+ else
+ edgemap_default["id"] = 1.0;
}
}
More information about the Lemon-commits
mailing list