Removing the ‘const’? Why?
I believe Christophe is objecting to using a lambda whereas all other computations use named functions. But frankly, here, I would have written: const int palette_colors = out_bits > 8 ? 0 : bits == 2 ? 4 : 1 << out_bits; Not that I don’t like lambdas, but here, it’s a lot of additional syntactic noise. Out of curiosity, I submitted both variants of the code to g++, and got exactly the same generated code.
|
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel