Move mapper methods to free functions
As a design pattern, free functions are preferable to lambdas because
they reduce scopes, and produce better stack traces which include the
name of the function when things go wrong. This commit moves them.
Unfortunately, because of the interface_map capture, we still need the
lambda to be able to capture that reference, but that still seems much
better than leaving everything in a lambda.
In theory, this also makes them easier to unit test, although that
pattern isn't shown directly in this patchset.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ib3ade71ab4572378461a62e233738776578de2f1
1 file changed