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
d2c7fe6b
Commit
d2c7fe6b
authored
Feb 11, 2016
by
Joshua Haberman
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1194 from Photonios/master
Fixed unused parameters and extra ';'
parents
655a9d66
37d6cf9c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
37 deletions
+37
-37
arena.h
src/google/protobuf/arena.h
+1
-1
arenastring.h
src/google/protobuf/arenastring.h
+6
-6
descriptor.h
src/google/protobuf/descriptor.h
+5
-5
message.h
src/google/protobuf/message.h
+16
-16
repeated_field.h
src/google/protobuf/repeated_field.h
+3
-3
wire_format_lite_inl.h
src/google/protobuf/wire_format_lite_inl.h
+6
-6
No files found.
src/google/protobuf/arena.h
View file @
d2c7fe6b
...
...
@@ -76,7 +76,7 @@ template<typename T> void arena_destruct_object(void* object) {
template
<
typename
T
>
void
arena_delete_object
(
void
*
object
)
{
delete
reinterpret_cast
<
T
*>
(
object
);
}
inline
void
arena_free
(
void
*
object
,
size_t
size
)
{
inline
void
arena_free
(
void
*
object
,
size_t
/* size */
)
{
free
(
object
);
}
...
...
src/google/protobuf/arenastring.h
View file @
d2c7fe6b
...
...
@@ -64,7 +64,7 @@ struct LIBPROTOBUF_EXPORT ArenaStringPtr {
}
// Basic accessors.
inline
const
::
std
::
string
&
Get
(
const
::
std
::
string
*
default_value
)
const
{
inline
const
::
std
::
string
&
Get
(
const
::
std
::
string
*
/* default_value */
)
const
{
return
*
ptr_
;
}
...
...
@@ -102,7 +102,7 @@ struct LIBPROTOBUF_EXPORT ArenaStringPtr {
// state. Used to implement unsafe_arena_release_<field>() methods on
// generated classes.
inline
::
std
::
string
*
UnsafeArenaRelease
(
const
::
std
::
string
*
default_value
,
::
google
::
protobuf
::
Arena
*
arena
)
{
::
google
::
protobuf
::
Arena
*
/* arena */
)
{
if
(
ptr_
==
default_value
)
{
return
NULL
;
}
...
...
@@ -134,7 +134,7 @@ struct LIBPROTOBUF_EXPORT ArenaStringPtr {
// UnsafeArenaRelease() on another field of a message in the same arena. Used
// to implement unsafe_arena_set_allocated_<field> in generated classes.
inline
void
UnsafeArenaSetAllocated
(
const
::
std
::
string
*
default_value
,
::
std
::
string
*
value
,
::
google
::
protobuf
::
Arena
*
arena
)
{
::
std
::
string
*
value
,
::
google
::
protobuf
::
Arena
*
/* arena */
)
{
if
(
value
!=
NULL
)
{
ptr_
=
value
;
}
else
{
...
...
@@ -163,7 +163,7 @@ struct LIBPROTOBUF_EXPORT ArenaStringPtr {
// the user) will always be the empty string. Assumes that |default_value|
// is an empty string.
inline
void
ClearToEmpty
(
const
::
std
::
string
*
default_value
,
::
google
::
protobuf
::
Arena
*
arena
)
{
::
google
::
protobuf
::
Arena
*
/* arena */
)
{
if
(
ptr_
==
default_value
)
{
// Already set to default (which is empty) -- do nothing.
}
else
{
...
...
@@ -175,7 +175,7 @@ struct LIBPROTOBUF_EXPORT ArenaStringPtr {
// overhead of heap operations. After this returns, the content (as seen by
// the user) will always be equal to |default_value|.
inline
void
ClearToDefault
(
const
::
std
::
string
*
default_value
,
::
google
::
protobuf
::
Arena
*
arena
)
{
::
google
::
protobuf
::
Arena
*
/* arena */
)
{
if
(
ptr_
==
default_value
)
{
// Already set to default -- do nothing.
}
else
{
...
...
@@ -215,7 +215,7 @@ struct LIBPROTOBUF_EXPORT ArenaStringPtr {
void
AssignWithDefault
(
const
::
std
::
string
*
default_value
,
ArenaStringPtr
value
);
inline
const
::
std
::
string
&
GetNoArena
(
const
::
std
::
string
*
default_value
)
const
{
inline
const
::
std
::
string
&
GetNoArena
(
const
::
std
::
string
*
/* default_value */
)
const
{
return
*
ptr_
;
}
...
...
src/google/protobuf/descriptor.h
View file @
d2c7fe6b
...
...
@@ -1645,7 +1645,7 @@ PROTOBUF_DEFINE_ARRAY_ACCESSOR(Descriptor, reserved_range,
const
Descriptor
::
ReservedRange
*
)
PROTOBUF_DEFINE_ACCESSOR
(
Descriptor
,
reserved_name_count
,
int
)
PROTOBUF_DEFINE_OPTIONS_ACCESSOR
(
Descriptor
,
MessageOptions
)
;
PROTOBUF_DEFINE_OPTIONS_ACCESSOR
(
Descriptor
,
MessageOptions
)
PROTOBUF_DEFINE_ACCESSOR
(
Descriptor
,
is_placeholder
,
bool
)
PROTOBUF_DEFINE_STRING_ACCESSOR
(
FieldDescriptor
,
name
)
...
...
@@ -1690,7 +1690,7 @@ PROTOBUF_DEFINE_ACCESSOR(EnumDescriptor, containing_type, const Descriptor*)
PROTOBUF_DEFINE_ACCESSOR
(
EnumDescriptor
,
value_count
,
int
)
PROTOBUF_DEFINE_ARRAY_ACCESSOR
(
EnumDescriptor
,
value
,
const
EnumValueDescriptor
*
)
PROTOBUF_DEFINE_OPTIONS_ACCESSOR
(
EnumDescriptor
,
EnumOptions
)
;
PROTOBUF_DEFINE_OPTIONS_ACCESSOR
(
EnumDescriptor
,
EnumOptions
)
PROTOBUF_DEFINE_ACCESSOR
(
EnumDescriptor
,
is_placeholder
,
bool
)
PROTOBUF_DEFINE_STRING_ACCESSOR
(
EnumValueDescriptor
,
name
)
...
...
@@ -1705,14 +1705,14 @@ PROTOBUF_DEFINE_ACCESSOR(ServiceDescriptor, file, const FileDescriptor*)
PROTOBUF_DEFINE_ACCESSOR
(
ServiceDescriptor
,
method_count
,
int
)
PROTOBUF_DEFINE_ARRAY_ACCESSOR
(
ServiceDescriptor
,
method
,
const
MethodDescriptor
*
)
PROTOBUF_DEFINE_OPTIONS_ACCESSOR
(
ServiceDescriptor
,
ServiceOptions
)
;
PROTOBUF_DEFINE_OPTIONS_ACCESSOR
(
ServiceDescriptor
,
ServiceOptions
)
PROTOBUF_DEFINE_STRING_ACCESSOR
(
MethodDescriptor
,
name
)
PROTOBUF_DEFINE_STRING_ACCESSOR
(
MethodDescriptor
,
full_name
)
PROTOBUF_DEFINE_ACCESSOR
(
MethodDescriptor
,
service
,
const
ServiceDescriptor
*
)
PROTOBUF_DEFINE_ACCESSOR
(
MethodDescriptor
,
input_type
,
const
Descriptor
*
)
PROTOBUF_DEFINE_ACCESSOR
(
MethodDescriptor
,
output_type
,
const
Descriptor
*
)
PROTOBUF_DEFINE_OPTIONS_ACCESSOR
(
MethodDescriptor
,
MethodOptions
)
;
PROTOBUF_DEFINE_OPTIONS_ACCESSOR
(
MethodDescriptor
,
MethodOptions
)
PROTOBUF_DEFINE_ACCESSOR
(
MethodDescriptor
,
client_streaming
,
bool
)
PROTOBUF_DEFINE_ACCESSOR
(
MethodDescriptor
,
server_streaming
,
bool
)
...
...
@@ -1726,7 +1726,7 @@ PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, message_type_count, int)
PROTOBUF_DEFINE_ACCESSOR
(
FileDescriptor
,
enum_type_count
,
int
)
PROTOBUF_DEFINE_ACCESSOR
(
FileDescriptor
,
service_count
,
int
)
PROTOBUF_DEFINE_ACCESSOR
(
FileDescriptor
,
extension_count
,
int
)
PROTOBUF_DEFINE_OPTIONS_ACCESSOR
(
FileDescriptor
,
FileOptions
)
;
PROTOBUF_DEFINE_OPTIONS_ACCESSOR
(
FileDescriptor
,
FileOptions
)
PROTOBUF_DEFINE_ACCESSOR
(
FileDescriptor
,
is_placeholder
,
bool
)
PROTOBUF_DEFINE_ARRAY_ACCESSOR
(
FileDescriptor
,
message_type
,
const
Descriptor
*
)
...
...
src/google/protobuf/message.h
View file @
d2c7fe6b
...
...
@@ -739,9 +739,9 @@ class LIBPROTOBUF_EXPORT Reflection {
// specifyed by 'field' passing ownership to the message.
// TODO(tmarek): Make virtual after all subclasses have been
// updated.
virtual
void
AddAllocatedMessage
(
Message
*
message
,
const
FieldDescriptor
*
field
,
Message
*
new_entry
)
const
{}
virtual
void
AddAllocatedMessage
(
Message
*
/* message */
,
const
FieldDescriptor
*
/*field */
,
Message
*
/* new_entry */
)
const
{}
// Get a RepeatedFieldRef object that can be used to read the underlying
...
...
@@ -947,27 +947,27 @@ class LIBPROTOBUF_EXPORT Reflection {
// TODO(jieluo) - make the map APIs pure virtual after updating
// all the subclasses.
// Returns true if key is in map. Returns false if key is not in map field.
virtual
bool
ContainsMapKey
(
const
Message
&
message
,
const
FieldDescriptor
*
field
,
const
MapKey
&
key
)
const
{
virtual
bool
ContainsMapKey
(
const
Message
&
/* message*/
,
const
FieldDescriptor
*
/* field */
,
const
MapKey
&
/* key */
)
const
{
return
false
;
}
// If key is in map field: Saves the value pointer to val and returns
// false. If key in not in map field: Insert the key into map, saves
// value pointer to val and retuns true.
virtual
bool
InsertOrLookupMapValue
(
Message
*
message
,
const
FieldDescriptor
*
field
,
const
MapKey
&
key
,
MapValueRef
*
val
)
const
{
virtual
bool
InsertOrLookupMapValue
(
Message
*
/* message */
,
const
FieldDescriptor
*
/* field */
,
const
MapKey
&
/* key */
,
MapValueRef
*
/* val */
)
const
{
return
false
;
}
// Delete and returns true if key is in the map field. Returns false
// otherwise.
virtual
bool
DeleteMapValue
(
Message
*
message
,
const
FieldDescriptor
*
field
,
const
MapKey
&
key
)
const
{
virtual
bool
DeleteMapValue
(
Message
*
/* mesage */
,
const
FieldDescriptor
*
/* field */
,
const
MapKey
&
/* key */
)
const
{
return
false
;
}
...
...
@@ -987,15 +987,15 @@ class LIBPROTOBUF_EXPORT Reflection {
// Get the number of <key, value> pair of a map field. The result may be
// different from FieldSize which can have duplicate keys.
virtual
int
MapSize
(
const
Message
&
message
,
const
FieldDescriptor
*
field
)
const
{
virtual
int
MapSize
(
const
Message
&
/* message */
,
const
FieldDescriptor
*
/* field */
)
const
{
return
0
;
}
// Help method for MapIterator.
friend
class
MapIterator
;
virtual
internal
::
MapFieldBase
*
MapData
(
Message
*
message
,
const
FieldDescriptor
*
field
)
const
{
Message
*
/* message */
,
const
FieldDescriptor
*
/* field */
)
const
{
return
NULL
;
}
...
...
src/google/protobuf/repeated_field.h
View file @
d2c7fe6b
...
...
@@ -574,7 +574,7 @@ class GenericTypeHandler {
template
<
typename
GenericType
>
GenericType
*
GenericTypeHandler
<
GenericType
>::
NewFromPrototype
(
const
GenericType
*
prototype
,
::
google
::
protobuf
::
Arena
*
arena
)
{
const
GenericType
*
/* prototype */
,
::
google
::
protobuf
::
Arena
*
arena
)
{
return
New
(
arena
);
}
template
<
typename
GenericType
>
...
...
@@ -627,7 +627,7 @@ void GenericTypeHandler<MessageLite>::Merge(const MessageLite& from,
// Message specialization bodies defined in message.cc. This split is necessary
// to allow proto2-lite (which includes this header) to be independent of
// Message.
DECLARE_SPECIALIZATIONS_FOR_BASE_PROTO_TYPES
(
Message
)
;
DECLARE_SPECIALIZATIONS_FOR_BASE_PROTO_TYPES
(
Message
)
#undef DECLARE_SPECIALIZATIONS_FOR_BASE_PROTO_TYPES
...
...
@@ -674,7 +674,7 @@ class LIBPROTOBUF_EXPORT StringTypeHandlerBase {
static
inline
::
google
::
protobuf
::
Arena
*
GetArena
(
string
*
)
{
return
NULL
;
}
static
inline
void
*
GetMaybeArenaPointer
(
string
*
value
)
{
static
inline
void
*
GetMaybeArenaPointer
(
string
*
/* value */
)
{
return
NULL
;
}
static
inline
void
Delete
(
string
*
value
,
Arena
*
arena
)
{
...
...
src/google/protobuf/wire_format_lite_inl.h
View file @
d2c7fe6b
...
...
@@ -412,12 +412,12 @@ inline bool WireFormatLite::ReadPackedPrimitive< \
CPPTYPE, WireFormatLite::DECLARED_TYPE>(input, values); \
}
READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE
(
uint32
,
TYPE_FIXED32
)
;
READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE
(
uint64
,
TYPE_FIXED64
)
;
READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE
(
int32
,
TYPE_SFIXED32
)
;
READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE
(
int64
,
TYPE_SFIXED64
)
;
READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE
(
float
,
TYPE_FLOAT
)
;
READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE
(
double
,
TYPE_DOUBLE
)
;
READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE
(
uint32
,
TYPE_FIXED32
)
READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE
(
uint64
,
TYPE_FIXED64
)
READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE
(
int32
,
TYPE_SFIXED32
)
READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE
(
int64
,
TYPE_SFIXED64
)
READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE
(
float
,
TYPE_FLOAT
)
READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE
(
double
,
TYPE_DOUBLE
)
#undef READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE
...
...
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