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
Oh, blah, the original author seems to have use GradientN for everything, which makes the code annoying to review:
8 - r = is->optionGetGr adient1Red () / (float)0xffff; adient1Green () / (float)0xffff; adient1Blue () / (float)0xffff; adient1Alpha () / (float)0xffff; adient2Red () / (float)0xffff; adient2Green () / (float)0xffff; adient2Blue () / (float)0xffff; adient2Alpha () / (float)0xffff;
9 - g = is->optionGetGr
10 - b = is->optionGetGr
11 - a = is->optionGetGr
12 + r = is->optionGetGr
13 + g = is->optionGetGr
14 + b = is->optionGetGr
15 + a = is->optionGetGr
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?