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

Remove all usages of Bindable<float> and Bindable<double> #7709

Merged
merged 2 commits into from Feb 2, 2020

Conversation

bdach
Copy link
Collaborator

@bdach bdach commented Feb 1, 2020

Resolves #7708.

Summary

Due to using Bindable<double>s previously, song select's filter control would not apply tolerance when checking IsDefault, therefore wrongly hiding maps with star ratings above 10.1.

To avoid further floating-point comparison bugs, remove all usages of Bindable<{float,double}>, replacing them with their Bindable{Float,Double} counterparts.

Remarks

No tests this time, mostly because I consider the old versions as accidental mis-use of the framework and therefore I'd be only testing the framework usage.

I'm not sure if some of those original ones weren't intended. I don't know what reason there would be to use Bindable<{float,double}> other than performance. Because of this I split off the PR into two commits, the first of which resolves the issue and the second all the other remaining usages, for easy revertability of the latter if deemed too far-reaching.

I also wanted to use the BannedApiAnalyzer to report usages of the constructor at the time of static analysis, but it seems that won't be possible as it uses the documentation ID string format for identifying code elements, which does not permit specifying type parameters when referring to genericised members.

I also opened ppy/osu-framework#3229 for further discussion on whether we want to allow usage of Bindable<{float,double}> at framework level at all.

Due to using Bindable<double>s previously, song select's filter control
would not apply tolerance when checking IsDefault, therefore wrongly
hiding maps with star ratings above 10.1.
To avoid further floating-point comparison bugs, remove all usages of
Bindable<{float,double}>, replacing them with their
Bindable<Float,Double> counterparts.
@peppy peppy merged commit ed48e30 into ppy:master Feb 2, 2020
@bdach bdach deleted the bindable-float-double branch February 2, 2020 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Difficulty above 10.1 Stars doesnt show up
2 participants