diff options
author | David Robillard <d@drobilla.net> | 2012-08-11 03:38:07 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-08-11 03:38:07 +0000 |
commit | e271414476309ef4491444376cf0050936816a24 (patch) | |
tree | 3fd31684054a0ef49e1e8cc3e67a2ac299b2df32 /plugins/eg-amp.lv2 | |
parent | 99d273dba0c9d657e0cd174174bba576ff8e5d43 (diff) | |
download | lv2-e271414476309ef4491444376cf0050936816a24.tar.xz |
Improve const correctness.
Diffstat (limited to 'plugins/eg-amp.lv2')
-rw-r--r-- | plugins/eg-amp.lv2/amp.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/eg-amp.lv2/amp.c b/plugins/eg-amp.lv2/amp.c index 7f7cacc..86f7a81 100644 --- a/plugins/eg-amp.lv2/amp.c +++ b/plugins/eg-amp.lv2/amp.c @@ -41,9 +41,9 @@ typedef enum { /** Plugin instance. */ typedef struct { // Port buffers - float* gain; - float* input; - float* output; + const float* gain; + const float* input; + float* output; } Amp; /** Create a new plugin instance. */ @@ -68,10 +68,10 @@ connect_port(LV2_Handle instance, switch ((PortIndex)port) { case AMP_GAIN: - amp->gain = (float*)data; + amp->gain = (const float*)data; break; case AMP_INPUT: - amp->input = (float*)data; + amp->input = (const float*)data; break; case AMP_OUTPUT: amp->output = (float*)data; @@ -92,7 +92,7 @@ activate(LV2_Handle instance) static void run(LV2_Handle instance, uint32_t n_samples) { - Amp* amp = (Amp*)instance; + const Amp* amp = (const Amp*)instance; const float gain = *(amp->gain); const float* const input = amp->input; |