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
84731a11
Commit
84731a11
authored
Oct 03, 2014
by
Feng Xiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Down-integrate from internal branch.
parent
0dd3fef8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
15 deletions
+14
-15
list_people.cc
examples/list_people.cc
+0
-1
descriptor.h
src/google/protobuf/descriptor.h
+11
-11
unknown_field_set.h
src/google/protobuf/unknown_field_set.h
+3
-3
No files found.
examples/list_people.cc
View file @
84731a11
...
...
@@ -4,7 +4,6 @@
#include <fstream>
#include <string>
#include "addressbook.pb.h"
#include <google/protobuf/io/zero_copy_stream_impl_lite.h>
using
namespace
std
;
// Iterates though all people in the AddressBook and prints info about them.
...
...
src/google/protobuf/descriptor.h
View file @
84731a11
...
...
@@ -1594,44 +1594,44 @@ inline bool FieldDescriptor::is_packable() const {
// in the parent's array of children.
inline
int
FieldDescriptor
::
index
()
const
{
if
(
!
is_extension_
)
{
return
this
-
containing_type_
->
fields_
;
return
static_cast
<
int
>
(
this
-
containing_type_
->
fields_
)
;
}
else
if
(
extension_scope_
!=
NULL
)
{
return
this
-
extension_scope_
->
extensions_
;
return
static_cast
<
int
>
(
this
-
extension_scope_
->
extensions_
)
;
}
else
{
return
this
-
file_
->
extensions_
;
return
static_cast
<
int
>
(
this
-
file_
->
extensions_
)
;
}
}
inline
int
Descriptor
::
index
()
const
{
if
(
containing_type_
==
NULL
)
{
return
this
-
file_
->
message_types_
;
return
static_cast
<
int
>
(
this
-
file_
->
message_types_
)
;
}
else
{
return
this
-
containing_type_
->
nested_types_
;
return
static_cast
<
int
>
(
this
-
containing_type_
->
nested_types_
)
;
}
}
inline
int
OneofDescriptor
::
index
()
const
{
return
this
-
containing_type_
->
oneof_decls_
;
return
static_cast
<
int
>
(
this
-
containing_type_
->
oneof_decls_
)
;
}
inline
int
EnumDescriptor
::
index
()
const
{
if
(
containing_type_
==
NULL
)
{
return
this
-
file_
->
enum_types_
;
return
static_cast
<
int
>
(
this
-
file_
->
enum_types_
)
;
}
else
{
return
this
-
containing_type_
->
enum_types_
;
return
static_cast
<
int
>
(
this
-
containing_type_
->
enum_types_
)
;
}
}
inline
int
EnumValueDescriptor
::
index
()
const
{
return
this
-
type_
->
values_
;
return
static_cast
<
int
>
(
this
-
type_
->
values_
)
;
}
inline
int
ServiceDescriptor
::
index
()
const
{
return
this
-
file_
->
services_
;
return
static_cast
<
int
>
(
this
-
file_
->
services_
)
;
}
inline
int
MethodDescriptor
::
index
()
const
{
return
this
-
service_
->
methods_
;
return
static_cast
<
int
>
(
this
-
service_
->
methods_
)
;
}
inline
const
char
*
FieldDescriptor
::
type_name
()
const
{
...
...
src/google/protobuf/unknown_field_set.h
View file @
84731a11
...
...
@@ -138,7 +138,7 @@ class LIBPROTOBUF_EXPORT UnknownFieldSet {
bool
ParseFromZeroCopyStream
(
io
::
ZeroCopyInputStream
*
input
);
bool
ParseFromArray
(
const
void
*
data
,
int
size
);
inline
bool
ParseFromString
(
const
string
&
data
)
{
return
ParseFromArray
(
data
.
data
(),
data
.
size
(
));
return
ParseFromArray
(
data
.
data
(),
static_cast
<
int
>
(
data
.
size
()
));
}
private
:
...
...
@@ -236,7 +236,7 @@ inline void UnknownFieldSet::Swap(UnknownFieldSet* x) {
}
inline
int
UnknownFieldSet
::
field_count
()
const
{
return
(
fields_
==
NULL
)
?
0
:
fields_
->
size
(
);
return
(
fields_
==
NULL
)
?
0
:
static_cast
<
int
>
(
fields_
->
size
()
);
}
inline
const
UnknownField
&
UnknownFieldSet
::
field
(
int
index
)
const
{
return
(
*
fields_
)[
index
];
...
...
@@ -304,7 +304,7 @@ inline UnknownFieldSet* UnknownField::mutable_group() {
inline
int
UnknownField
::
GetLengthDelimitedSize
()
const
{
GOOGLE_DCHECK_EQ
(
TYPE_LENGTH_DELIMITED
,
type
());
return
length_delimited_
.
string_value_
->
size
(
);
return
static_cast
<
int
>
(
length_delimited_
.
string_value_
->
size
()
);
}
inline
void
UnknownField
::
SetType
(
Type
type
)
{
...
...
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