Menu

#325 Make mouse_func_t structures to be const.

v3.x
closed-accepted
nobody
None
enhancement
2021-11-19
2021-11-15
No

I would like to suggest to make the structures mouse_func_t to be const.

By looking also the functions mousedrv_resources_init() for the GTK3 and SDL backends, the code could be simplified because there is no need to copy all members of the structure manually. It is possible to do the same job by using just the assignment operator.

1 Attachments

Discussion

  • compyx

    compyx - 2021-11-19
    • status: open --> closed-accepted
     
  • compyx

    compyx - 2021-11-19

    Agreed, copying by assignment simplifies the code. Patch applied in r41159.
    Thanks for the patch!

     

Log in to post a comment.