summaryrefslogtreecommitdiffstats
path: root/options/m_property.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-08-31 15:25:22 +0200
committerwm4 <wm4@nowhere>2016-08-31 15:31:51 +0200
commitce8dae3f0d9d269fc925f3a83abde4cde3b36ebb (patch)
treea4c795b915502f01b186601c4edaf1b60bd8df40 /options/m_property.c
parentf519887fe7571fb6e05f29b50d6f0bede1646b28 (diff)
downloadmpv-ce8dae3f0d9d269fc925f3a83abde4cde3b36ebb.tar.bz2
mpv-ce8dae3f0d9d269fc925f3a83abde4cde3b36ebb.tar.xz
m_property: remove pointless explicitly clamping
This is basically dead code, and even the commit that added this code 4 years ago said that this should be for debugging only. (Though it is possible that the clamp callback was used for something else, and then unused again. Also, some of the clamping code remains and is used for internal checking, e.g. clamp_double().)
Diffstat (limited to 'options/m_property.c')
-rw-r--r--options/m_property.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/options/m_property.c b/options/m_property.c
index d0579768c6..4ed4f5f586 100644
--- a/options/m_property.c
+++ b/options/m_property.c
@@ -125,15 +125,6 @@ int m_property_do(struct mp_log *log, const struct m_property *prop_list,
return r;
}
case M_PROPERTY_SET: {
- if (!log)
- return M_PROPERTY_ERROR;
- m_option_copy(&opt, &val, arg);
- r = opt.type->clamp ? opt.type->clamp(&opt, arg) : 0;
- m_option_free(&opt, &val);
- if (r != 0) {
- mp_err(log, "Property '%s': invalid value.\n", name);
- return M_PROPERTY_ERROR;
- }
return do_action(prop_list, name, M_PROPERTY_SET, arg, ctx);
}
case M_PROPERTY_GET_NODE: {