Code review comment for lp:~mc-return/compiz/compiz.merge-fix1070233-resize-info-gradient-color-settings-ignored

Revision history for this message
Sam Spilsbury (smspillaz) wrote :

Oh, blah, the original author seems to have use GradientN for everything, which makes the code annoying to review:

8 - r = is->optionGetGradient1Red () / (float)0xffff;
9 - g = is->optionGetGradient1Green () / (float)0xffff;
10 - b = is->optionGetGradient1Blue () / (float)0xffff;
11 - a = is->optionGetGradient1Alpha () / (float)0xffff;
12 + r = is->optionGetGradient2Red () / (float)0xffff;
13 + g = is->optionGetGradient2Green () / (float)0xffff;
14 + b = is->optionGetGradient2Blue () / (float)0xffff;
15 + a = is->optionGetGradient2Alpha () / (float)0xffff;

My advice earlier about using static_cast and numeric_limits still applies here.

Do you think you could also change the gradient_n names in the xml file to something more sensible while you're at it too?

« Back to merge proposal