Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
a2484208
Commit
a2484208
authored
Aug 12, 2016
by
Sergio Campamá
Committed by
Thomas Van Lenten
Aug 12, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes extra whitespace on generated comments. (#1950)
Fixes extra whitespace on generated comments.
parent
cd561ddd
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
11 additions
and
3 deletions
+11
-3
GPBExtensionRegistry.h
objectivec/GPBExtensionRegistry.h
+1
-1
Any.pbobjc.h
objectivec/google/protobuf/Any.pbobjc.h
+0
-0
Api.pbobjc.h
objectivec/google/protobuf/Api.pbobjc.h
+0
-0
Duration.pbobjc.h
objectivec/google/protobuf/Duration.pbobjc.h
+0
-0
Empty.pbobjc.h
objectivec/google/protobuf/Empty.pbobjc.h
+0
-0
FieldMask.pbobjc.h
objectivec/google/protobuf/FieldMask.pbobjc.h
+0
-0
Struct.pbobjc.h
objectivec/google/protobuf/Struct.pbobjc.h
+0
-0
Timestamp.pbobjc.h
objectivec/google/protobuf/Timestamp.pbobjc.h
+0
-0
Wrappers.pbobjc.h
objectivec/google/protobuf/Wrappers.pbobjc.h
+0
-0
objectivec_helpers.cc
...google/protobuf/compiler/objectivec/objectivec_helpers.cc
+10
-2
No files found.
objectivec/GPBExtensionRegistry.h
View file @
a2484208
...
...
@@ -77,7 +77,7 @@ NS_ASSUME_NONNULL_BEGIN
* @param descriptor The descriptor to look for a registered extension on.
* @param fieldNumber The field number of the extension to look for.
*
* @return The registered
GPBExtensionDescripto
or nil if none was found.
* @return The registered
GPBExtensionDescriptor
or nil if none was found.
**/
-
(
nullable
GPBExtensionDescriptor
*
)
extensionForDescriptor
:(
GPBDescriptor
*
)
descriptor
fieldNumber
:(
NSInteger
)
fieldNumber
;
...
...
objectivec/google/protobuf/Any.pbobjc.h
View file @
a2484208
objectivec/google/protobuf/Api.pbobjc.h
View file @
a2484208
objectivec/google/protobuf/Duration.pbobjc.h
View file @
a2484208
objectivec/google/protobuf/Empty.pbobjc.h
View file @
a2484208
objectivec/google/protobuf/FieldMask.pbobjc.h
View file @
a2484208
objectivec/google/protobuf/Struct.pbobjc.h
View file @
a2484208
objectivec/google/protobuf/Timestamp.pbobjc.h
View file @
a2484208
objectivec/google/protobuf/Wrappers.pbobjc.h
View file @
a2484208
src/google/protobuf/compiler/objectivec/objectivec_helpers.cc
View file @
a2484208
...
...
@@ -850,14 +850,17 @@ string BuildCommentsString(const SourceLocation& location,
string
final_comments
;
string
epilogue
;
bool
add_leading_space
=
false
;
if
(
prefer_single_line
&&
lines
.
size
()
==
1
)
{
prefix
=
"/** "
;
suffix
=
" */
\n
"
;
}
else
{
prefix
=
"
* "
;
prefix
=
"* "
;
suffix
=
"
\n
"
;
final_comments
+=
"/**
\n
"
;
epilogue
=
" **/
\n
"
;
add_leading_space
=
true
;
}
for
(
int
i
=
0
;
i
<
lines
.
size
();
i
++
)
{
...
...
@@ -868,7 +871,12 @@ string BuildCommentsString(const SourceLocation& location,
// Decouple / from * to not have inline comments inside comments.
line
=
StringReplace
(
line
,
"/*"
,
"/
\\
*"
,
true
);
line
=
StringReplace
(
line
,
"*/"
,
"*
\\
/"
,
true
);
final_comments
+=
prefix
+
line
+
suffix
;
line
=
prefix
+
line
;
StripWhitespace
(
&
line
);
// If not a one line, need to add the first space before *, as
// StripWhitespace would have removed it.
line
=
(
add_leading_space
?
" "
:
""
)
+
line
;
final_comments
+=
line
+
suffix
;
}
final_comments
+=
epilogue
;
return
final_comments
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment