-
Notifications
You must be signed in to change notification settings - Fork 15.6k
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
Cleanup various bits of Google.Protobuf #6674
Changes from 5 commits
71c492d
3457f88
6f09cc3
f084d62
1a0ff95
d5e964c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,13 +107,14 @@ internal void CrossLink() | |
{ | ||
descriptor.CrossLink(); | ||
|
||
IList<FieldDescriptor> _; | ||
if (!declarationOrder.TryGetValue(descriptor.ExtendeeType, out _)) | ||
IList<FieldDescriptor> list; | ||
if (!declarationOrder.TryGetValue(descriptor.ExtendeeType, out list)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
is more readable. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we add an editorconfig with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. At some point, I'd like to add a set of rules to enforce code style in the protobuf C# codebase. I'm not sure what the best approach is (there are multiple ways of doing this). |
||
{ | ||
declarationOrder.Add(descriptor.ExtendeeType, new List<FieldDescriptor>()); | ||
list = new List<FieldDescriptor>(); | ||
declarationOrder.Add(descriptor.ExtendeeType, list); | ||
} | ||
|
||
declarationOrder[descriptor.ExtendeeType].Add(descriptor); | ||
list.Add(descriptor); | ||
} | ||
|
||
extensionsByTypeInDeclarationOrder = declarationOrder | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for adding the comment.
nit: Use
/// <summary>
block for comments outside the method body.