[Wsplgen-commits] r154 - trunk/src
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed Jan 26 10:00:32 CET 2011
Author: teichmann
Date: 2011-01-26 10:00:31 +0100 (Wed, 26 Jan 2011)
New Revision: 154
Modified:
trunk/src/xy.cpp
Log:
Make it compilable with gcc again.
Modified: trunk/src/xy.cpp
===================================================================
--- trunk/src/xy.cpp 2010-05-07 16:54:36 UTC (rev 153)
+++ trunk/src/xy.cpp 2011-01-26 09:00:31 UTC (rev 154)
@@ -2754,8 +2754,10 @@
int VorZ = NoZ;
int VorM = 0;
- TPointList::iterator VorIter = 0;
+ bool isVorIterSet = false;
+ TPointList::iterator VorIter;
+
for (TPointList::iterator i = PointList->begin(); i != PointList->end(); i++)
{
TPoint* Point = *i;
@@ -2777,15 +2779,19 @@
else
{
// In der Mitte interpoliert
- for (TPointList::iterator j = VorIter; j != i; j++)
+ if (isVorIterSet)
{
- TPoint* Point = *j;
- Point->Z = VorZ + (Z - VorZ) * (Point->Meter - VorM) / (M - VorM);
+ for (TPointList::iterator j = VorIter; j != i; j++)
+ {
+ TPoint* Point = *j;
+ Point->Z = VorZ + (Z - VorZ) * (Point->Meter - VorM) / (M - VorM);
+ }
}
}
VorZ = Z;
VorM = M;
VorIter = i;
+ isVorIterSet = true;
}
}
More information about the Wsplgen-commits
mailing list