From 447b44c67368a4e1686d1db2688e5624a63cd0f4 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 6 Oct 2024 13:42:19 -0400 Subject: Fix code formatting --- include/lv2/ui/ui.h | 2 +- plugins/eg-amp.lv2/amp.c | 2 +- plugins/eg-sampler.lv2/sampler.c | 2 +- plugins/eg-scope.lv2/examploscope_ui.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/lv2/ui/ui.h b/include/lv2/ui/ui.h index d825d76..d17edcb 100644 --- a/include/lv2/ui/ui.h +++ b/include/lv2/ui/ui.h @@ -69,7 +69,7 @@ /** The index returned by LV2UI_Port_Map::port_index() for unknown ports. */ -#define LV2UI_INVALID_PORT_INDEX ((uint32_t)-1) +#define LV2UI_INVALID_PORT_INDEX ((uint32_t)(-1)) #ifdef __cplusplus extern "C" { diff --git a/plugins/eg-amp.lv2/amp.c b/plugins/eg-amp.lv2/amp.c index 90a5769..9c22049 100644 --- a/plugins/eg-amp.lv2/amp.c +++ b/plugins/eg-amp.lv2/amp.c @@ -105,7 +105,7 @@ activate(LV2_Handle instance) {} /** Define a macro for converting a gain in dB to a coefficient. */ -#define DB_CO(g) ((g) > -90.0f ? powf(10.0f, (g)*0.05f) : 0.0f) +#define DB_CO(g) ((g) > -90.0f ? powf(10.0f, (g) * 0.05f) : 0.0f) /** The `run()` method is the main process function of the plugin. It processes diff --git a/plugins/eg-sampler.lv2/sampler.c b/plugins/eg-sampler.lv2/sampler.c index d870a07..d2d480d 100644 --- a/plugins/eg-sampler.lv2/sampler.c +++ b/plugins/eg-sampler.lv2/sampler.c @@ -353,7 +353,7 @@ deactivate(LV2_Handle instance) } /** Define a macro for converting a gain in dB to a coefficient. */ -#define DB_CO(g) ((g) > -90.0f ? powf(10.0f, (g)*0.05f) : 0.0f) +#define DB_CO(g) ((g) > -90.0f ? powf(10.0f, (g) * 0.05f) : 0.0f) /** Handle an incoming event in the audio thread. diff --git a/plugins/eg-scope.lv2/examploscope_ui.c b/plugins/eg-scope.lv2/examploscope_ui.c index 1c82d44..5684406 100644 --- a/plugins/eg-scope.lv2/examploscope_ui.c +++ b/plugins/eg-scope.lv2/examploscope_ui.c @@ -222,7 +222,7 @@ on_expose_event(GtkWidget* widget, GdkEventExpose* ev, gpointer data) const float chn_y_offset = DAHEIGHT * c + DAHEIGHT * 0.5f - 0.5f; const float chn_y_scale = DAHEIGHT * 0.5f * gain; -#define CYPOS(VAL) (chn_y_offset - (VAL)*chn_y_scale) +#define CYPOS(VAL) (chn_y_offset - (VAL) * chn_y_scale) cairo_save(cr); -- cgit v1.2.1