summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmil Velikov <emil.l.velikov@gmail.com>2021-10-03 18:31:42 +0100
committerDudemanguy <random342@airmail.cc>2021-11-15 14:02:08 +0000
commitf09396ab7d584311a9784006eca53f6379e7218b (patch)
tree41aed3d7a05df891bb515b98649fd03741e237ea
parent37619c4cf590f866bfb5fe517ef4daefb36c9193 (diff)
downloadmpv-f09396ab7d584311a9784006eca53f6379e7218b.tar.bz2
mpv-f09396ab7d584311a9784006eca53f6379e7218b.tar.xz
options: const annotate m_obj_list accessors
Nearly all the code base correctly references the data as constant. But a couple of instances - fix those. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
-rw-r--r--options/m_option.c2
-rw-r--r--player/command.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/options/m_option.c b/options/m_option.c
index 9c9101f2e7..ec84200ad7 100644
--- a/options/m_option.c
+++ b/options/m_option.c
@@ -3311,7 +3311,7 @@ static int parse_obj_settings_list(struct mp_log *log, const m_option_t *opt,
int op = OP_NONE;
bool *mark_del = NULL;
int num_items = obj_settings_list_num_items(dst ? VAL(dst) : 0);
- struct m_obj_list *ol = opt->priv;
+ const struct m_obj_list *ol = opt->priv;
assert(opt->priv);
diff --git a/player/command.c b/player/command.c
index 0b0dc71715..7403bb4cf4 100644
--- a/player/command.c
+++ b/player/command.c
@@ -3395,7 +3395,7 @@ static int mp_property_option_info(void *ctx, struct m_property *prop,
MP_TARRAY_APPEND(NULL, choices, num, NULL);
}
if (opt->type == &m_option_type_obj_settings_list) {
- struct m_obj_list *objs = opt->priv;
+ const struct m_obj_list *objs = opt->priv;
int num = 0;
for (int n = 0; ; n++) {
struct m_obj_desc desc = {0};