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

cure warning CS0253: Possible unintended reference comparison; to get a ... #127

Merged

Conversation

MinnieTheMoocher
Copy link

...value comparison, cast the right hand side to type 'System.Delegate'

A value comparison is what we want here. The C# equality operator will exactly do what is wanted here:
check if a function is already in the list and, if yes, remove it.

cf http://msdn.microsoft.com/en-us/library/system.delegate.op_equality(v=vs.100).aspx

Change-Id: I64e85006140fca3d81e733f13d7e8cf17bfaa336

@monoadmin
Copy link

Hello! I'm the build bot for the Mono project. I need approval from a Mono team member to build this pull request. A team member should reply with "approve" to approve a build of this pull request, "whitelist" to whitelist this and all future pull requests from this contributor, or "build" to explicitly request a build, even if one has already been done. Contributors can ignore this message.

2 similar comments
@monoadmin
Copy link

Hello! I'm the build bot for the Mono project. I need approval from a Mono team member to build this pull request. A team member should reply with "approve" to approve a build of this pull request, "whitelist" to whitelist this and all future pull requests from this contributor, or "build" to explicitly request a build, even if one has already been done. Contributors can ignore this message.

@monoadmin
Copy link

Hello! I'm the build bot for the Mono project. I need approval from a Mono team member to build this pull request. A team member should reply with "approve" to approve a build of this pull request, "whitelist" to whitelist this and all future pull requests from this contributor, or "build" to explicitly request a build, even if one has already been done. Contributors can ignore this message.

… a value comparison, cast the right hand side to type 'System.Delegate'

A value comparison is what we want here. The C# equality operator will exactly do what is wanted here:
check if a function is already in the list and, if yes, remove it.

cf http://msdn.microsoft.com/en-us/library/system.delegate.op_equality(v=vs.100).aspx

Change-Id: I64e85006140fca3d81e733f13d7e8cf17bfaa336

(cherry picked from commit 8009a2c)

(cherry picked from commit 8009a2c)
@MinnieTheMoocher
Copy link
Author

ping, can please someone merge this warning removal? @duncanmak ?

it just cures a build warning

@MinnieTheMoocher
Copy link
Author

ping, can please someone merge this warning removal? @duncanmak ?

it just cures a build warning

mhutch added a commit that referenced this pull request Sep 8, 2015
cure warning CS0253: Possible unintended reference comparison; to get a ...
@mhutch mhutch merged commit eb3ef5f into mono:gtk-sharp-2-12-branch Sep 8, 2015
@mhutch
Copy link
Member

mhutch commented Sep 8, 2015

(I'm not a maintainer, but this seems strightforward enough that I can merge it safely)

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.

4 participants