aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2024-10-06 13:42:19 -0400
committerDavid Robillard <d@drobilla.net>2024-10-06 13:42:19 -0400
commit447b44c67368a4e1686d1db2688e5624a63cd0f4 (patch)
treebc9b4c02421a5cf49117b711da539a0ee48f8246
parentbe34b0b08bd2d007ff7f40aef88071796eba3c6a (diff)
downloadlv2-447b44c67368a4e1686d1db2688e5624a63cd0f4.tar.xz
Fix code formatting
-rw-r--r--include/lv2/ui/ui.h2
-rw-r--r--plugins/eg-amp.lv2/amp.c2
-rw-r--r--plugins/eg-sampler.lv2/sampler.c2
-rw-r--r--plugins/eg-scope.lv2/examploscope_ui.c2
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);