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
d7d9accc
Commit
d7d9accc
authored
Aug 26, 2015
by
Feng Xiao
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #748 from xfxyjwf/unused_typedef
Remove an unused typedef.
parents
042bfaf6
b7bbe543
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
6 deletions
+0
-6
cpp_message.cc
src/google/protobuf/compiler/cpp/cpp_message.cc
+0
-6
No files found.
src/google/protobuf/compiler/cpp/cpp_message.cc
View file @
d7d9accc
...
@@ -2536,13 +2536,7 @@ GenerateOneofClear(io::Printer* printer) {
...
@@ -2536,13 +2536,7 @@ GenerateOneofClear(io::Printer* printer) {
printer
->
Print
(
oneof_vars
,
printer
->
Print
(
oneof_vars
,
"void $classname$::clear_$oneofname$() {
\n
"
);
"void $classname$::clear_$oneofname$() {
\n
"
);
printer
->
Indent
();
printer
->
Indent
();
// In .proto.h mode, fields with a dependent type will generate
// clearing code that down casts from the dependent base class.
// However, clear_oneof() methods are always in the .cc file, and thus
// must remain in the derived base. So, to make the clearing code work,
// we add a typedef so that the down cast works (it will be a no-op).
printer
->
Print
(
oneof_vars
,
printer
->
Print
(
oneof_vars
,
"typedef $classname$ T;
\n
"
"switch($oneofname$_case()) {
\n
"
);
"switch($oneofname$_case()) {
\n
"
);
printer
->
Indent
();
printer
->
Indent
();
for
(
int
j
=
0
;
j
<
descriptor_
->
oneof_decl
(
i
)
->
field_count
();
j
++
)
{
for
(
int
j
=
0
;
j
<
descriptor_
->
oneof_decl
(
i
)
->
field_count
();
j
++
)
{
...
...
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