Cleanup FunctorCore
-
struct
does not needpublic
declaration - prefer
mag
oversqrt(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 introducingassert_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 ofbool
cast toint
Edited by Gerhard Raven