[vlc-devel] [PATCH 03/14] input: name input event structs

Romain Vimont rom1v at videolabs.io
Mon Aug 20 11:01:58 CEST 2018

On Thu, Aug 16, 2018 at 09:54:08PM +0300, Rémi Denis-Courmont wrote:
> Le torstaina 16. elokuuta 2018, 17.02.00 EEST Romain Vimont a écrit :
> > Some input event structs contain enums, whose values can be accessed
> > globally in C, but need a qualified access in C++. Since these enums are
> > defined inside unamed union and structs, there was no way to use them
> > from C++ code.
> > 
> > To avoid the problem, declare named structs for every event type
> > requiring more than one field.
> I would have thought more natural to take the enums out.

I prefer to extract the structs, so that we can refer to a specific
event type without passing the whole union.

More information about the vlc-devel mailing list