mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-12-01 00:21:14 +00:00
make fluid_settings_foreach_option_t const correct
This commit is contained in:
parent
180038d416
commit
12a9692211
4 changed files with 5 additions and 5 deletions
|
@ -175,7 +175,7 @@ int fluid_settings_getint_range(fluid_settings_t* settings, const char *name,
|
||||||
* @param name Setting name
|
* @param name Setting name
|
||||||
* @param option A string option for this setting (iterates through the list)
|
* @param option A string option for this setting (iterates through the list)
|
||||||
*/
|
*/
|
||||||
typedef void (*fluid_settings_foreach_option_t)(void *data, char *name, char *option);
|
typedef void (*fluid_settings_foreach_option_t)(void *data, const char *name, const char *option);
|
||||||
|
|
||||||
FLUIDSYNTH_API
|
FLUIDSYNTH_API
|
||||||
void fluid_settings_foreach_option(fluid_settings_t* settings,
|
void fluid_settings_foreach_option(fluid_settings_t* settings,
|
||||||
|
|
|
@ -1517,7 +1517,7 @@ struct _fluid_handle_option_data_t {
|
||||||
fluid_ostream_t out;
|
fluid_ostream_t out;
|
||||||
};
|
};
|
||||||
|
|
||||||
void fluid_handle_print_option(void* data, char* name, char* option)
|
void fluid_handle_print_option(void* data, const char* name, const char* option)
|
||||||
{
|
{
|
||||||
struct _fluid_handle_option_data_t* d = (struct _fluid_handle_option_data_t*) data;
|
struct _fluid_handle_option_data_t* d = (struct _fluid_handle_option_data_t*) data;
|
||||||
|
|
||||||
|
|
|
@ -141,7 +141,7 @@ typedef struct
|
||||||
|
|
||||||
/* Function to display each string option value */
|
/* Function to display each string option value */
|
||||||
static void
|
static void
|
||||||
settings_option_foreach_func (void *data, char *name, char *option)
|
settings_option_foreach_func (void *data, const char *name, const char *option)
|
||||||
{
|
{
|
||||||
OptionBag *bag = data;
|
OptionBag *bag = data;
|
||||||
|
|
||||||
|
|
|
@ -1421,7 +1421,7 @@ fluid_settings_foreach_option (fluid_settings_t* settings, const char *name,
|
||||||
newlist = fluid_list_sort (newlist, fluid_list_str_compare_func);
|
newlist = fluid_list_sort (newlist, fluid_list_str_compare_func);
|
||||||
|
|
||||||
for (p = newlist; p; p = p->next)
|
for (p = newlist; p; p = p->next)
|
||||||
(*func)(data, (char *)name, (char *)fluid_list_get (p));
|
(*func)(data, name, (const char *)fluid_list_get (p));
|
||||||
|
|
||||||
fluid_rec_mutex_unlock (settings->mutex); /* -- unlock */
|
fluid_rec_mutex_unlock (settings->mutex); /* -- unlock */
|
||||||
|
|
||||||
|
@ -1611,7 +1611,7 @@ fluid_settings_foreach (fluid_settings_t* settings, void* data,
|
||||||
/* Loop over names and call the callback */
|
/* Loop over names and call the callback */
|
||||||
for (p = bag.names; p; p = p->next)
|
for (p = bag.names; p; p = p->next)
|
||||||
{
|
{
|
||||||
if (fluid_settings_get (settings, (char *)(p->data), &node) == FLUID_OK
|
if (fluid_settings_get (settings, (const char *)(p->data), &node) == FLUID_OK
|
||||||
&& node)
|
&& node)
|
||||||
(*func) (data, (char *)(p->data), node->type);
|
(*func) (data, (char *)(p->data), node->type);
|
||||||
FLUID_FREE (p->data); /* -- Free name */
|
FLUID_FREE (p->data); /* -- Free name */
|
||||||
|
|
Loading…
Reference in a new issue