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

Fix warning CS0649 #287

Merged
merged 2 commits into from Jan 2, 2019

Conversation

Projects
None yet
3 participants
@kevingosse
Copy link
Contributor

kevingosse commented Jan 2, 2019

Removed the unused fields when compiling in release mode

Contributes to #48

Fix warning CS0649
Removed the unused fields when compiling in release mode

@kevingosse kevingosse requested a review from dotnet/dotnet-winforms as a code owner Jan 2, 2019

@@ -33,8 +33,6 @@ internal class Com2TypeInfoProcessor {

#if DEBUG
private static TraceSwitch DbgTypeInfoProcessorSwitch = new TraceSwitch("DbgTypeInfoProcessor", "Com2TypeInfoProcessor: debug Com2 type info processing");

This comment has been minimized.

@sharwell

sharwell Jan 2, 2019

Member

Why not just unconditionally assign a value to DbgTypeInfoProcessorSwitch (even in Release builds)? In other words, can we use the current change except also remove the #if DEBUG lines around the field and inside the Trace method?

This comment has been minimized.

@kevingosse

kevingosse Jan 2, 2019

Contributor

That's a good point. I focused so much on removing the unused field that I forgot I could do it the other way around. If I do that I may as well remove the Trace method as it then serves no purpose

This comment has been minimized.

@zsd4yr

zsd4yr Jan 2, 2019

Member

I agree

@zsd4yr

zsd4yr approved these changes Jan 2, 2019

@zsd4yr zsd4yr merged commit 58b89f3 into dotnet:master Jan 2, 2019

1 check passed

license/cla All CLA requirements met.
Details
@zsd4yr

This comment has been minimized.

Copy link
Member

zsd4yr commented Jan 2, 2019

:shipit:

@kevingosse kevingosse deleted the kevingosse:unused_fields branch Jan 3, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment