Skip to content

Cleanup FunctorCore

Gerhard Raven requested to merge cleanup-functorcore into master
  • struct does not need public declaration
  • prefer mag over sqrt(mag2)
  • avoid special handling of SmartRef -- instead, use the fact that it has pointer semantics
  • add constraints to some template functions, and prefer this to checking for explicit 'is_legacy_particle`
  • use already existing always_false instead of introducing assert_error which does the same (and which has a name that doesn't match what it really does, but is named after what it could be used for)
  • fix spelling
  • remove redundant deref_if_ptr
  • move 'internal' python functors (i.e. those whose name starts with _) into the scope of the functor that uses them instead of leaving them at global scope
  • when a functor is really a predicate, call it a predicate and return bool instead of bool cast to int
Edited by Gerhard Raven

Merge request reports

Loading