Carlos wrote: > [...] > Oh, but wait. You now use icon2 as also a parameter to decide whether > to combine it with 'xis' below. At least having the comment there > makes one realize something odd is happening.
Quoting the patch, for WPrefs.h: +/* Loads `file' into `icon1'. If `icon2' is not NULL, combine `icon1' + * with some grey and then optionally with image `xis', and store it + * in `icon2' (typically to produce a greyed-out, red-crossed version + * of `icon1') */ +void CreateImages(WMScreen *scr, RContext *rc, RImage *xis, char *file, + WMPixmap **icon1, WMPixmap **icon2); Here you go ;-) > [...] > So I think this function should have another parameter, say an > integer (or even an boolen) called 'combine'. [...] For a brand new function, yes, probably. Here, I'm not sure it's worth reworking that old function. To improve readability, we could repeat the comment from WPrefs.h and/or create a local variable combine = (icon2 != NULL), that the compiler will be free to optimize out. -- Daniel -- To unsubscribe, send mail to [email protected].
