On 8/12/22 14:17, Gabriel Ivăncescu wrote:
On 12/08/2022 19:57, Zebediah Figura (she/her) wrote:
On 8/12/22 01:51, Rémi Bernon (@rbernon) wrote:
Is there anything I should do here?
Sorry, I just accidentally dropped this on the floor.
I'm not thrilled about how much more space this requires, but I don't see any better way to do these checks at compile time, so I'll approve the merge request. _______________________________________________ wine-gitlab mailing list -- wine-gitlab@winehq.org To unsubscribe send an email to wine-gitlab-leave@winehq.org
FWIW, you can use C_ASSERT near the array and add some enum value at the end that marks the count of formats in the enum (WG_AUDIO_FORMAT_NUM?). It's used in some other parts of wine. _______________________________________________ wine-gitlab mailing list -- wine-gitlab@winehq.org To unsubscribe send an email to wine-gitlab-leave@winehq.org
It works, although I'm still not sure I like it better than this approach.
I'd prefer to use designated initializers, but that won't catch missing entries at compile time.