Remove all usages of Bindable<float> and Bindable<double> #7709
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #7708.
Summary
Due to using
Bindable<double>
s previously, song select's filter control would not apply tolerance when checkingIsDefault
, 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 theirBindable{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.