From 6f3d2fef5d1b2ef4ee969465585c582e4fbca8e6 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 22 May 2012 21:28:00 +0000 Subject: Don't cast inputs to non-const pointers. git-svn-id: http://svn.drobilla.net/lad/trunk/plugins/blip.lv2@4437 a436a847-0d15-0410-975c-d299462d15a1 --- src/random.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/random.c') diff --git a/src/random.c b/src/random.c index 9aab30a..4a6f5b8 100644 --- a/src/random.c +++ b/src/random.c @@ -102,10 +102,10 @@ runRandom_fasa_oa(LV2_Handle instance, Random* plugin = (Random*)instance; /* Frequency (Hz) (array of floats of length sample_count) */ - float* frequency = plugin->frequency; + const float* frequency = plugin->frequency; /* Wave smoothness (array of floats of length sample_count) */ - float* smooth = plugin->smooth; + const float* smooth = plugin->smooth; /* Output (array of floats of length sample_count) */ float* output = plugin->output; @@ -163,10 +163,10 @@ runRandom_fasc_oa(LV2_Handle instance, Random* plugin = (Random*)instance; /* Frequency (Hz) (array of floats of length sample_count) */ - float* frequency = plugin->frequency; + const float* frequency = plugin->frequency; /* Wave smoothness (float value) */ - float smooth = f_clip(*(plugin->smooth), 0.0f, 1.0f); + const float smooth = f_clip(*(plugin->smooth), 0.0f, 1.0f); /* Output (array of floats of length sample_count) */ float* output = plugin->output; @@ -220,10 +220,10 @@ runRandom_fcsa_oa(LV2_Handle instance, Random* plugin = (Random*)instance; /* Frequency (Hz) (float value) */ - float frequency = *(plugin->frequency); + const float frequency = *(plugin->frequency); /* Wave smoothness (array of floats of length sample_count) */ - float* smooth = plugin->smooth; + const float* smooth = plugin->smooth; /* Output (pointer to float value) */ float* output = plugin->output; @@ -279,10 +279,10 @@ runRandom_fcsc_oa(LV2_Handle instance, Random* plugin = (Random*)instance; /* Frequency (Hz) (float value) */ - float frequency = *(plugin->frequency); + const float frequency = *(plugin->frequency); /* Wave smoothness (float value) */ - float smooth = f_clip(*(plugin->smooth), 0.0f, 1.0f); + const float smooth = f_clip(*(plugin->smooth), 0.0f, 1.0f); /* Output (array of floats of length sample_count) */ float* output = plugin->output; -- cgit v1.2.1