3 ms·
I'm using anonymous nested structs extensively for grouping related items, but I consider the extra field name a feature, not something that should be hidden:
by flohofwoe 5y ago
I'm using anonymous nested structs extensively for grouping related items, but I consider the extra field name a feature, not something that should be hidden:
https://github.com/floooh/sokol-samples/blob/bfb30ea00b5948f2029c7dd228cf30de08b8036c/sapp/shdfeatures-sapp.c#L136-L165 https://github.com/floooh/sokol-samples/blob/bfb30ea00b5948f...
(also note the 'inplace initialization' which follows the state struct definition using C99's designated initialization)