summaryrefslogtreecommitdiffstats
path: root/options/m_option.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-12-18 06:57:24 +0100
committerwm4 <wm4@nowhere>2019-12-18 06:57:24 +0100
commit5f74ed58286a1339412554932f31844ec1b64280 (patch)
treeffaf1ac28e26afb4c104ccec0fc60c6226ade3a2 /options/m_option.c
parent9b9307ea9fa2a2f7f24b9ebec65ca622900af2f7 (diff)
downloadmpv-5f74ed58286a1339412554932f31844ec1b64280.tar.bz2
mpv-5f74ed58286a1339412554932f31844ec1b64280.tar.xz
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.
Diffstat (limited to 'options/m_option.c')
-rw-r--r--options/m_option.c6
1 files changed, 6 insertions, 0 deletions
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")) {