-
Notifications
You must be signed in to change notification settings - Fork 259
Pack fill_gap into alpha_idx
#1238
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
Changes from 5 commits
d16bf5b
305f49e
078422b
1872eb3
9d5b2ad
bd97a68
a217c0c
0eeac37
c0947d3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -915,7 +915,7 @@ impl RenderContext { | |
| .iter() | ||
| .map(move |strip| { | ||
| let mut adjusted_strip = *strip; | ||
| adjusted_strip.alpha_idx += alpha_offset; | ||
| adjusted_strip.set_alpha_idx(adjusted_strip.alpha_idx().wrapping_add(alpha_offset)); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we really want a wrapping add here? Wouldn't it be better to just use normal add so that at least in debug mode it panics?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, you're right. Thank you - nice catch! Fixed in a217c0c
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And fixed in hybrid in c0947d3 |
||
| adjusted_strip | ||
| }) | ||
| .collect() | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
Isn't it
u32::MAX / 2(oru32::MAX << 1)?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.
Whoops - fixed in bd97a68