options: change parameter that was forgottin in property transition

17d91b9d4d changed the name,
but not the parameter type and cast
This commit is contained in:
Christoph Heinrich 2023-02-26 17:40:10 +01:00 committed by sfan5
parent c5265381b5
commit a194ddaa43
2 changed files with 3 additions and 3 deletions

View File

@ -352,11 +352,11 @@ void m_properties_print_help_list(struct mp_log *log,
mp_info(log, "\nTotal: %d properties\n", count);
}
int m_property_bool_ro(int action, void* arg, int var)
int m_property_bool_ro(int action, void* arg, bool var)
{
switch (action) {
case M_PROPERTY_GET:
*(int *)arg = !!var;
*(bool *)arg = !!var;
return M_PROPERTY_OK;
case M_PROPERTY_GET_TYPE:
*(struct m_option *)arg = (struct m_option){.type = CONF_TYPE_BOOL};

View File

@ -176,7 +176,7 @@ char* m_properties_expand_string(const struct m_property *prop_list,
const char *str, void *ctx);
// Trivial helpers for implementing properties.
int m_property_bool_ro(int action, void* arg, int var);
int m_property_bool_ro(int action, void* arg, bool var);
int m_property_int_ro(int action, void* arg, int var);
int m_property_int64_ro(int action, void* arg, int64_t var);
int m_property_float_ro(int action, void* arg, float var);