Skip to content

Commit

Permalink
Avoid allocations
Browse files Browse the repository at this point in the history
  • Loading branch information
CasBex committed Aug 17, 2023
1 parent ebb7610 commit a895080
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/FMI2/int.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1185,15 +1185,12 @@ See also [`fmi2CompletedIntegratorStep`](@ref).
"""
function fmi2CompletedIntegratorStep(c::FMU2Component,
noSetFMUStatePriorToCurrentPoint::fmi2Boolean)
enterEventMode = zeros(fmi2Boolean, 1)
terminateSimulation = zeros(fmi2Boolean, 1)

status = fmi2CompletedIntegratorStep!(c,
noSetFMUStatePriorToCurrentPoint,
pointer(enterEventMode),
pointer(terminateSimulation))
c.ptr_stepEnterEventMode,
c.ptr_terminateSimulation)

return (status, enterEventMode[1], terminateSimulation[1])
return (status, c.stepEnterEventMode, c.terminateSimulation)
end

"""
Expand Down

0 comments on commit a895080

Please sign in to comment.