Branch: Tag:

2014-05-26

2014-05-26 15:31:21 by Per Hedbor <ph@opera.com>

Removed a few casts

76:      int get_color_from_pikecolor(struct object *o, INT_TYPE *r, INT_TYPE *g, INT_TYPE *b) {    struct color_struct *col; -  col=(struct color_struct *)get_storage(o,image_color_program); +  col=get_storage(o,image_color_program);    if (!col)    return 0;    *r=col->rgbl.r/(COLORLMAX/65535);
94:       TIMER_INIT("Getting extents");    -  img_data=(struct image*)get_storage(img, image_program); +  img_data=get_storage(img, image_program);       /* 1a: create the actual image... */    x = img_data->xsize;
299:    struct object_wrapper * o;    if (!from)    return NULL; -  o=(struct object_wrapper *)get_storage(from,type); +  o=get_storage(from,type);    if (!o)    return 0;    return o->obj;
309:    void *f;    if (!from)    return NULL; -  if (type) +  if(type)    f=get_storage( from, type );    else    f=from->storage; /* Add a warning? */
320:      void pgtk2_destruct(struct object *o) {    struct object_wrapper *ow= -  (struct object_wrapper *)get_storage(o,pg2_object_program); +  get_storage(o,pg2_object_program);    if (ow) /* This should always be true. But let's add a check anyway. */    ow->obj=NULL;    if (o->refs>1)