spa: remove unnecessary indirection for some spa_log_topics

This results in shorter machine code since it removes one
pointer load and a NULL check.
This commit is contained in:
Barnabás Pőcze 2023-10-06 12:41:55 +02:00 committed by Wim Taymans
parent d2b5b53c08
commit 8256a2d5a6
13 changed files with 39 additions and 35 deletions

View file

@ -18,12 +18,12 @@ extern const struct spa_handle_factory spa_libcamera_manager_factory;
extern const struct spa_handle_factory spa_libcamera_device_factory;
#undef SPA_LOG_TOPIC_DEFAULT
#define SPA_LOG_TOPIC_DEFAULT libcamera_log_topic
extern struct spa_log_topic *libcamera_log_topic;
#define SPA_LOG_TOPIC_DEFAULT &libcamera_log_topic
extern struct spa_log_topic libcamera_log_topic;
static inline void libcamera_log_topic_init(struct spa_log *log)
{
spa_log_topic_init(log, libcamera_log_topic);
spa_log_topic_init(log, &libcamera_log_topic);
}
#ifdef __cplusplus