-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Combined conditions #8011
Combined conditions #8011
Conversation
src/_imagingcms.c
Outdated
} else if (strcmp(PILmode, "RGBA;16B") == 0) { | ||
return TYPE_RGBA_16; | ||
} else if (strcmp(PILmode, "CMYK") == 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More of a style issue: these all return
, I think it reads a little cleaner to remove the else
s:
} else if (strcmp(PILmode, "RGBA;16B") == 0) { | |
return TYPE_RGBA_16; | |
} else if (strcmp(PILmode, "CMYK") == 0) { | |
} | |
if (strcmp(PILmode, "RGBA;16B") == 0) { | |
return TYPE_RGBA_16; | |
} | |
if (strcmp(PILmode, "CMYK") == 0) { |
etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I've updated the commit.
src/_imagingcms.c
Outdated
} else if ( | ||
strcmp(PILmode, "YCCA") == 0 || | ||
strcmp(PILmode, "YCC") == 0 | ||
) { | ||
return TYPE_YCbCr_8; | ||
} else if (strcmp(PILmode, "LAB") == 0) { | ||
// LabX equivalent like ALab, but not reversed -- no #define in lcms2 | ||
return (COLORSPACE_SH(PT_LabV2) | CHANNELS_SH(3) | BYTES_SH(1) | EXTRA_SH(1)); | ||
} | ||
else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And ditch and dedent this block?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I know what you meant, I've updated the commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, like that :)
Speaking of formatting, anyone interested in adding |
Hmmm, I ran it local and got a bunch of additional changes but … cool! Thanks |
No description provided.