Skip to content
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

fixed SampledImage::sample() fns being unnecessarily marked as unsafe #1029

Merged
merged 2 commits into from
Apr 6, 2023

Conversation

Firestar99
Copy link

@Firestar99 Firestar99 commented Apr 6, 2023

Seems to be a forgotten leftover from a refactor in #359


EDIT(@eddyb): removed quoted Discord messages (referring to bc2a121) in favor of PR comments (see below)

@Firestar99 Firestar99 changed the title fixed SampledImage::sample() fns being marked as unsafe fixed SampledImage::sample() fns being unnecessarily marked as unsafe Apr 6, 2023
@Firestar99 Firestar99 marked this pull request as ready for review April 6, 2023 19:14
Copy link
Contributor

@eddyb eddyb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Context for what went wrong here: in bc2a121
(intermediary state during the original Image PR #359), the S method-level parameter was replaced with the Image "sampled type" (which, crucially, didn't exist initially in the Image PR #359).

But the signature change wasn't accompanied by removing the then-inaccurate safety aspects (the UB only ever stemmed from the OpTypeImage "Sampled Type" and that S parameter being able to differ).

@eddyb eddyb enabled auto-merge (rebase) April 6, 2023 21:53
@eddyb eddyb merged commit 883ba3f into EmbarkStudios:main Apr 6, 2023
@Firestar99 Firestar99 deleted the sampledimage branch April 11, 2023 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants