# HG changeset patch # User reimar # Date 1392568199 0 # Node ID 97446d4850ccf625473dacab4e45fd4b31a77e80 # Parent b11dc6175323af3c985594f5e0064f29cd1163c4 m_option, vf_scale: Add some missing const. diff -r b11dc6175323 -r 97446d4850cc libmpcodecs/vf_scale.c --- a/libmpcodecs/vf_scale.c Sun Feb 16 16:29:58 2014 +0000 +++ b/libmpcodecs/vf_scale.c Sun Feb 16 16:29:59 2014 +0000 @@ -654,7 +654,7 @@ /// An example of presets usage static const struct size_preset { - char* name; + const char* name; int w, h; } vf_size_presets_defs[] = { // TODO add more 'standard' resolutions diff -r b11dc6175323 -r 97446d4850cc m_option.c --- a/m_option.c Sun Feb 16 16:29:58 2014 +0000 +++ b/m_option.c Sun Feb 16 16:29:59 2014 +0000 @@ -1962,9 +1962,9 @@ static int parse_obj_presets(const m_option_t* opt,const char *name, const char *param, void* dst, int src) { m_obj_presets_t* obj_p = (m_obj_presets_t*)opt->priv; - m_struct_t *in_desc,*out_desc; + const m_struct_t *in_desc,*out_desc; int s,i; - unsigned char* pre; + const unsigned char* pre; char* pre_name = NULL; if(!obj_p) { diff -r b11dc6175323 -r 97446d4850cc m_option.h --- a/m_option.h Sun Feb 16 16:29:58 2014 +0000 +++ b/m_option.h Sun Feb 16 16:29:59 2014 +0000 @@ -122,13 +122,13 @@ /// Extra definition needed for \ref m_option_type_obj_presets options. typedef struct { /// Description of the struct holding the presets. - struct m_struct_st* in_desc; + const struct m_struct_st* in_desc; /// Description of the struct that should be set by the presets. - struct m_struct_st* out_desc; + const struct m_struct_st* out_desc; /// Pointer to an array of structs defining the various presets. - void* presets; + const void* presets; /// Offset of the preset's name inside the in_struct. - void* name_off; + const void* name_off; } m_obj_presets_t; /// Set several fields in a struct at once.