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 implicit operator from bindables #2152

Merged
merged 3 commits into from
Feb 21, 2019

Conversation

UselessToucan
Copy link
Contributor

@UselessToucan UselessToucan commented Feb 14, 2019

resolves #2150

In order to avoid accidental misuse / misunderstandings, .Value must always be added to Bindable when requesting its value. One such case which used to be confusing:

Bindable<Drawable> bindableDrawable = new Bindable<Drawable>();

if (bindableDrawable != null)
{
    // true
}

if (bindableDrawable.Value != null)
{
    // false
}

Drawable drawable = null;

if (bindableDrawable == drawable)
{
    // ???
}

peppy
peppy previously approved these changes Feb 21, 2019
@peppy peppy merged commit 4630dff into ppy:master Feb 21, 2019
@UselessToucan UselessToucan deleted the remove_bindable_implicit_operator branch February 21, 2019 08:31
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.

Remove bindable's implicit operator
2 participants