tests/lib/conds: change `CreateClockCls` type to `std::function`
authorSimon Marchi <simon.marchi@efficios.com>
Thu, 2 May 2024 15:25:33 +0000 (11:25 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Wed, 9 Oct 2024 02:56:57 +0000 (22:56 -0400)
commitdc94f6dc14a8991f68204f4239527e849ef3b5e0
tree526811fe83f4564b963c296ac23cf176aaabb494
parent2ec9f669a63fc1af65f1777e83c3697fcd4a3a35
tests/lib/conds: change `CreateClockCls` type to `std::function`

The `CreateClockCls` callable type is currently a raw function pointer.
An upcoming patch will want to pass lambdas with captures, so change
`CreateClockCls` to be `std::function` instead.  Update the
`CreateClockCls` parameters to be non-const where we want to move the
value, and const-ref otherwise.

Remove the `noClockClass` function, and use an empty `CreateClockCls` to
mean "do not create a clock class".  I couldn't find how to do the
equivalent of the `createClockCls == noClockClass` with an
`std::function`, but using an empty `std::function` is clear enough (we
could have done it with a nullptr before too).

Change-Id: Ie30e42b68b5ffad566458933869e78da8ca01614
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12781
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Tested-by: jenkins <jenkins@lttng.org>
tests/lib/conds/clk-cls-compat-postconds-triggers.cpp
This page took 0.024291 seconds and 4 git commands to generate.