On Wed, Jul 05, 2017 at 06:59:46AM -0400, Frediano Ziglio wrote: > In my stash pile I have these: > > > diff --git a/common/quic.c b/common/quic.c > index c188ed2..aa0d8ab 100644 > --- a/common/quic.c > +++ b/common/quic.c > @@ -173,13 +173,13 @@ struct Encoder { > }; > > /* target wait mask index */ > -static const int wmimax = DEFwmimax; > +enum { wmimax = DEFwmimax }; > > /* number of symbols to encode before increasing wait mask index */ > -static const int wminext = DEFwminext; > +enum { wminext = DEFwminext }; > > /* model evolution mode */ > -static const int evol = DEFevol; > +enum { evol_mode_1 = 1, evol_mode_3 = 3, evol_mode_5 = 5, evol = DEFevol }; > > /* bppmask[i] contains i ones as lsb-s */ > static const unsigned long int bppmask[33] = { > > > Seems to work and enums are compile time constants. Did not answer to that one, but a #define for constants is more common than using enums this way. I'd be fine with enum { evol_mode_1 = 1, evol_mode_3 = 3, evol_mode_5 = 5 }; if that's useful in the rest of the code, but I'd rather not use enums for wmimax/wminext/evol Christophe
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel