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
894d18fb
Commit
894d18fb
authored
Dec 15, 2015
by
Kenichiro IDA
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Alter FileDescriptorTables::kEmpty to GetEmptyInstance()
parent
dc633398
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
descriptor.cc
src/google/protobuf/descriptor.cc
+6
-3
No files found.
src/google/protobuf/descriptor.cc
View file @
894d18fb
...
...
@@ -560,7 +560,7 @@ class FileDescriptorTables {
~
FileDescriptorTables
();
// Empty table, used with placeholder files.
static
const
FileDescriptorTables
kEmpty
;
inline
static
const
FileDescriptorTables
&
GetEmptyInstance
()
;
// -----------------------------------------------------------------
// Finding items.
...
...
@@ -665,7 +665,10 @@ FileDescriptorTables::FileDescriptorTables()
FileDescriptorTables
::~
FileDescriptorTables
()
{}
const
FileDescriptorTables
FileDescriptorTables
::
kEmpty
;
inline
const
FileDescriptorTables
&
FileDescriptorTables
::
GetEmptyInstance
()
{
static
const
FileDescriptorTables
kEmpty
;
return
kEmpty
;
}
void
DescriptorPool
::
Tables
::
AddCheckpoint
()
{
checkpoints_
.
push_back
(
CheckPoint
(
this
));
...
...
@@ -3535,7 +3538,7 @@ FileDescriptor* DescriptorBuilder::NewPlaceholderFile(
placeholder
->
package_
=
&
internal
::
GetEmptyString
();
placeholder
->
pool_
=
pool_
;
placeholder
->
options_
=
&
FileOptions
::
default_instance
();
placeholder
->
tables_
=
&
FileDescriptorTables
::
kEmpty
;
placeholder
->
tables_
=
&
FileDescriptorTables
::
GetEmptyInstance
()
;
placeholder
->
source_code_info_
=
&
SourceCodeInfo
::
default_instance
();
placeholder
->
is_placeholder_
=
true
;
placeholder
->
syntax_
=
FileDescriptor
::
SYNTAX_PROTO2
;
...
...
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