cpp-common/bt2c: change some `static inline` functions to just `inline`
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 21 Feb 2024 18:36:05 +0000 (13:36 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Tue, 26 Mar 2024 18:56:36 +0000 (14:56 -0400)
I believe that using `inline` for functions in header is preferable to
`static inline`.  With `static inline`, the symbols resulting from the
functions are internal to each translation unit.  We may end up with
multiple copies of the same function in the final executable.  With
`inline`, the linker de-duplicates them.  This is better for code size
and cache and all that.  It may not be relevant for these functions, but
it would be good to set the precendent for the functions we will add in
the future.

The caveat with that is that all copies a function must be identical
(ODR), but I don't think we have a problem with that.

Change-Id: I62eeacf4e8326d70cb94aec33d6684453e1b8912
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/11843
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Tested-by: jenkins <jenkins@lttng.org>

No differences found
This page took 0.026646 seconds and 4 git commands to generate.