Skip to content

Commit

Permalink
Merge pull request #1096 from SciML/os/remove-hasmethod-from-callback
Browse files Browse the repository at this point in the history
remove `hasmethod` from callback
  • Loading branch information
ChrisRackauckas authored Oct 19, 2024
2 parents 35a7735 + 1b40328 commit ba66e06
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/callbacks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -588,13 +588,8 @@ function apply_callback!(integrator,
end

if integrator.u_modified
if hasmethod(reeval_internals_due_to_modification!,
Tuple{typeof(integrator)}, (:callback_initializealg,))
reeval_internals_due_to_modification!(
integrator, callback_initializealg = callback.initializealg)
else # handle legacy dispatch without kwarg
reeval_internals_due_to_modification!(integrator)
end
reeval_internals_due_to_modification!(
integrator, callback_initializealg = callback.initializealg)

@inbounds if callback.save_positions[2]
savevalues!(integrator, true)
Expand Down

0 comments on commit ba66e06

Please sign in to comment.