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
tree: 34b2b8f6b5eb0099609664bfc267d0d866d43244
  1. fail-monitor/
  2. libmapper/
  3. src/
  4. subprojects/
  5. .clang-format
  6. .gitignore
  7. LICENSE
  8. MAINTAINERS
  9. meson.build
  10. meson_options.txt
  11. README.md
README.md

Prerequisites

Non-OpenBMC build dependencies are:

  • meson/ninja
  • boost
  • libsystemd
  • systemd
  • tinyxml2

Build

meson build && ninja -C build

Run Unit Tests

meson build && ninja -C build test

Clean the repository

rm -rf build