updates function signatures to use int-casted enum
This commit is contained in:
@@ -159,7 +159,7 @@ extern "C" {
|
||||
|
||||
int DLLEXPORT ENgetresultindex(int type, int index, int *value);
|
||||
|
||||
int DLLEXPORT ENtimetonextevent(EN_TimestepEvent *eventType, long *duration, int *elementIndex);
|
||||
int DLLEXPORT ENtimetonextevent(int *eventType, long *duration, int *elementIndex);
|
||||
|
||||
/********************************************************************
|
||||
|
||||
|
||||
@@ -642,11 +642,11 @@ typedef struct Project *EN_Project;
|
||||
/**
|
||||
@brief Get information about upcoming time step events, and what causes them.
|
||||
@param ph an EPANET project handle.
|
||||
@param[out] eventType the type of event that will occur.
|
||||
@param[out] eventType the type of event that will occur (see @ref EN_TimestepEvent).
|
||||
@param[out] duration the amount of time in the future this event will occur
|
||||
@param[out] elementIndex the index of the element causing the event.
|
||||
**/
|
||||
int DLLEXPORT EN_timetonextevent(EN_Project ph, EN_TimestepEvent *eventType, long *duration, int *elementIndex);
|
||||
int DLLEXPORT EN_timetonextevent(EN_Project ph, int *eventType, long *duration, int *elementIndex);
|
||||
|
||||
/**
|
||||
@brief Retrieves the order in which a node or link appears in an @ref OutFile "output file".
|
||||
|
||||
@@ -1612,7 +1612,7 @@ int DLLEXPORT EN_settimeparam(EN_Project p, int param, long value)
|
||||
|
||||
|
||||
/// get the time to next event, and give a reason for the time step truncation
|
||||
int DLLEXPORT EN_timetonextevent(EN_Project p, EN_TimestepEvent *eventType, long *duration, int *elementIndex)
|
||||
int DLLEXPORT EN_timetonextevent(EN_Project p, int *eventType, long *duration, int *elementIndex)
|
||||
{
|
||||
Times *time = &p->times;
|
||||
long hydStep, tankStep, controlStep;
|
||||
@@ -1626,17 +1626,17 @@ int DLLEXPORT EN_timetonextevent(EN_Project p, EN_TimestepEvent *eventType, lon
|
||||
|
||||
// return the lesser of the three step lengths
|
||||
if (controlStep < tankStep) {
|
||||
*eventType = EN_STEP_CONTROLEVENT;
|
||||
*eventType = (int)EN_STEP_CONTROLEVENT;
|
||||
*duration = controlStep;
|
||||
*elementIndex = iControl;
|
||||
}
|
||||
else if (tankStep < hydStep) {
|
||||
*eventType = EN_STEP_TANKEVENT;
|
||||
*eventType = (int)EN_STEP_TANKEVENT;
|
||||
*duration = tankStep;
|
||||
*elementIndex = iTank;
|
||||
}
|
||||
else {
|
||||
*eventType = EN_STEP_HYD;
|
||||
*eventType = (int)EN_STEP_HYD;
|
||||
*duration = hydStep;
|
||||
*elementIndex = 0;
|
||||
}
|
||||
|
||||
@@ -232,7 +232,7 @@ int DLLEXPORT ENgetresultindex(int type, int index, int *value)
|
||||
return EN_getresultindex(_defaultProject, type, index, value);
|
||||
}
|
||||
|
||||
int DLLEXPORT ENtimetonextevent(EN_TimestepEvent *eventType, long *duration, int *elementIndex)
|
||||
int DLLEXPORT ENtimetonextevent(int *eventType, long *duration, int *elementIndex)
|
||||
{
|
||||
return EN_timetonextevent(_defaultProject, eventType, duration, elementIndex);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user