Skip to content

Commit

Permalink
Avoid 'and' operator in C++ code since MSVC12 does not support it
Browse files Browse the repository at this point in the history
  • Loading branch information
SimplyDanny authored and OpenModelica-Hudson committed May 23, 2017
1 parent 16a7626 commit f821aa3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion SimulationRuntime/cpp/Include/FMU/FMUWrapper.h
Expand Up @@ -285,7 +285,7 @@ class FMUWrapper : public IFMUInterface
bool state_vars_reinitialized = _model->handleSystemEvents(events);
//time events
eventInfo.nextEventTime = _model->computeNextTimeEvents(_model->getTime());
if ((eventInfo.nextEventTime != 0.0) and (eventInfo.nextEventTime != std::numeric_limits<double>::max()))
if ((eventInfo.nextEventTime != 0.0) && (eventInfo.nextEventTime != std::numeric_limits<double>::max()))
eventInfo.upcomingTimeEvent = fmiTrue;
else
eventInfo.upcomingTimeEvent = fmiFalse;
Expand Down
2 changes: 1 addition & 1 deletion SimulationRuntime/cpp/Include/FMU2/FMU2Wrapper.cpp
Expand Up @@ -449,7 +449,7 @@ fmi2Status FMU2Wrapper::newDiscreteStates(fmi2EventInfo *eventInfo)
bool state_vars_reinitialized = _model->handleSystemEvents(events);
//time events
eventInfo->nextEventTime = _model->computeNextTimeEvents(_model->getTime());
if ((eventInfo->nextEventTime != 0.0) and (eventInfo->nextEventTime != std::numeric_limits<double>::max()))
if ((eventInfo->nextEventTime != 0.0) && (eventInfo->nextEventTime != std::numeric_limits<double>::max()))
eventInfo->nextEventTimeDefined = fmi2True;
else
eventInfo->nextEventTimeDefined = fmi2False;
Expand Down

0 comments on commit f821aa3

Please sign in to comment.