From 5f74ed58286a1339412554932f31844ec1b64280 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 18 Dec 2019 06:57:24 +0100 Subject: options: deprecate -del for list options I never liked that these used integer indexes. -remove should have existed from the start. This deprecation is yet another empty threat, though. --- options/m_option.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'options/m_option.c') diff --git a/options/m_option.c b/options/m_option.c index 874b22f6f4..19802f9fc4 100644 --- a/options/m_option.c +++ b/options/m_option.c @@ -1404,6 +1404,9 @@ static int parse_str_list_impl(struct mp_log *log, const m_option_t *opt, op = OP_PRE; } else if (bstr_endswith0(name, "-del")) { op = OP_DEL; + mp_warn(log, "Option %.*s: -del is deprecated! " + "Use -remove (removes by content instead of by index).\n", + BSTR_P(name)); } else if (bstr_endswith0(name, "-clr")) { op = OP_CLR; } else if (bstr_endswith0(name, "-set")) { @@ -3278,6 +3281,9 @@ static int parse_obj_settings_list(struct mp_log *log, const m_option_t *opt, op = OP_PRE; } else if (bstr_endswith0(name, "-del")) { op = OP_DEL; + mp_warn(log, "Option %.*s: -del is deprecated! " + "Use -remove (removes by content instead of by index).\n", + BSTR_P(name)); } else if (bstr_endswith0(name, "-remove")) { op = OP_REMOVE; } else if (bstr_endswith0(name, "-clr")) { -- cgit v1.2.3