Update epanet.c

Problem when compiling the DLL using the MSVC++ 2010 Express. 

Proposed change: Define `int iPoint;' before the for-loop

Error message reference: 
1>epanet.c(1767): error C2143: syntax error : missing ';' before 'type'
1>epanet.c(1767): error C2143: syntax error : missing ';' before 'type'
1>epanet.c(1767): error C2143: syntax error : missing ')' before 'type'
1>epanet.c(1767): error C2143: syntax error : missing ';' before 'type'
1>epanet.c(1767): error C2065: 'iPoint' : undeclared identifier
1>epanet.c(1767): warning C4552: '<' : operator has no effect; expected operator with side-effect
1>epanet.c(1767): error C2065: 'iPoint' : undeclared identifier
1>epanet.c(1767): error C2059: syntax error : ')'
1>epanet.c(1767): error C2143: syntax error : missing ';' before '{'
1>epanet.c(1768): error C2065: 'iPoint' : undeclared identifier
1>epanet.c(1769): error C2065: 'iPoint' : undeclared identifier
1>epanet.c(1770): error C2065: 'iPoint' : undeclared identifier
1>epanet.c(1771): error C2065: 'iPoint' : undeclared identifier
This commit is contained in:
eldemet
2013-07-16 15:14:38 +03:00
parent b09492b7e2
commit 2b7f91980a

View File

@@ -1764,7 +1764,8 @@ int DLLEXPORT ENgetcurve(int curveIndex, int *nValues, float **xValues, float *
float *pointX = calloc(nPoints, sizeof(float));
float *pointY = calloc(nPoints, sizeof(float));
for (int iPoint = 0; iPoint < nPoints; iPoint++) {
int iPoint;
for (iPoint = 0; iPoint < nPoints; iPoint++) {
double x = curve.X[iPoint] * Ucf[LENGTH];
double y = curve.Y[iPoint] * Ucf[VOLUME];
pointX[iPoint] = (float)x;