libhealthloop: Micro-optimize HealthLoop::RegisterEvent()

BoundFunction is an alias for std::function<>. Copying a function object
may be expensive. Use std::move() to avoid copying std::function<>. From
https://engdoc.corp.google.com/eng/doc/devguide/cpp/std_function.md:
"Generally prefer both accepting and passing by value if ownership is
transferred. Recall that when using value semantics, it's important to
also use std::move() when appropriate."

Bug: 203462310
Change-Id: I9fb87737dd5ce0fbb84bfbbdb0f8bb952dea1fbc
Signed-off-by: Bart Van Assche <bvanassche@google.com>
1 file changed