Skip to content

Commit

Permalink
[ObjC] Typos and comment improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasvl committed Apr 24, 2020
1 parent 7b6016e commit dddeed2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions objectivec/GPBDescriptor.m
Expand Up @@ -508,7 +508,8 @@ - (instancetype)initWithFieldDescription:(void *)description
BOOL isMessage = GPBDataTypeIsMessage(dataType);
BOOL isMapOrArray = GPBFieldIsMapOrArray(self);

// If proto3 optionals weren't know, compute the flag for the rest of the runtime.
// If proto3 optionals weren't known (i.e. generated code from an
// older version), compute the flag for the rest of the runtime.
if (!proto3OptionalKnown) {
// If it was...
// - proto3 syntax
Expand All @@ -530,7 +531,7 @@ - (instancetype)initWithFieldDescription:(void *)description
// autocreation.
hasOrCountSel_ = SelFromStrings(NULL, coreDesc->name, "_Count", NO);
} else {
// Know it is a single field; it gets has/setHas selectors if...
// It is a single field; it gets has/setHas selectors if...
// - not in a oneof (negative has index)
// - not clearing on zero
if ((coreDesc->hasIndex >= 0) &&
Expand Down
4 changes: 2 additions & 2 deletions objectivec/GPBDescriptor_PackagePrivate.h
Expand Up @@ -155,9 +155,9 @@ typedef NS_OPTIONS(uint32_t, GPBDescriptorInitializationFlags) {
// breaking change in the runtime.
GPBDescriptorInitializationFlag_UsesClassRefs = 1 << 2,

// This flag is used to indicate that the generated sources already containg
// This flag is used to indicate that the generated sources already contain
// the `GPBFieldClearHasIvarOnZero` flag and it doesn't have to be computed
// at startup, this allows older generated code to still work with the
// at startup. This allows older generated code to still work with the
// current runtime library.
GPBDescriptorInitializationFlag_Proto3OptionalKnown = 1 << 3,
};
Expand Down
2 changes: 1 addition & 1 deletion objectivec/GPBUtilities.h
Expand Up @@ -95,7 +95,7 @@ BOOL GPBMessageHasFieldSet(GPBMessage *self, GPBFieldDescriptor *field);
void GPBClearMessageField(GPBMessage *self, GPBFieldDescriptor *field);

/**
* Clears the given onoof field for the given message.
* Clears the given oneof field for the given message.
*
* @param self The message for which to clear the field.
* @param oneof The oneof to clear.
Expand Down

0 comments on commit dddeed2

Please sign in to comment.