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
e242a9b7
Unverified
Commit
e242a9b7
authored
Nov 26, 2018
by
Adam Cozzette
Committed by
GitHub
Nov 26, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5375 from arunov/fix-overrides-pr
Add overrides in C++ code.
parents
f22be4dd
45a595d2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
25 deletions
+24
-25
reflection_internal.h
src/google/protobuf/reflection_internal.h
+1
-1
default_value_objectwriter.h
...oogle/protobuf/util/internal/default_value_objectwriter.h
+1
-1
json_objectwriter.h
src/google/protobuf/util/internal/json_objectwriter.h
+14
-15
json_util.cc
src/google/protobuf/util/json_util.cc
+8
-8
No files found.
src/google/protobuf/reflection_internal.h
View file @
e242a9b7
...
...
@@ -203,7 +203,7 @@ class MapFieldAccessor final : public RandomAccessRepeatedFieldAccessor {
public
:
MapFieldAccessor
()
{}
virtual
~
MapFieldAccessor
()
{}
virtual
bool
IsEmpty
(
const
Field
*
data
)
const
{
bool
IsEmpty
(
const
Field
*
data
)
const
override
{
return
GetRepeatedField
(
data
)
->
empty
();
}
int
Size
(
const
Field
*
data
)
const
override
{
...
...
src/google/protobuf/util/internal/default_value_objectwriter.h
View file @
e242a9b7
...
...
@@ -119,7 +119,7 @@ class PROTOBUF_EXPORT DefaultValueObjectWriter : public ObjectWriter {
DefaultValueObjectWriter
*
RenderBytes
(
StringPiece
name
,
StringPiece
value
)
override
;
virtual
DefaultValueObjectWriter
*
RenderNull
(
StringPiece
name
)
;
DefaultValueObjectWriter
*
RenderNull
(
StringPiece
name
)
override
;
// Register the callback for scrubbing of fields. Owership of
// field_scrub_callback pointer is also transferred to this class
...
...
src/google/protobuf/util/internal/json_objectwriter.h
View file @
e242a9b7
...
...
@@ -95,21 +95,20 @@ class PROTOBUF_EXPORT JsonObjectWriter : public StructuredObjectWriter {
virtual
~
JsonObjectWriter
();
// ObjectWriter methods.
virtual
JsonObjectWriter
*
StartObject
(
StringPiece
name
);
virtual
JsonObjectWriter
*
EndObject
();
virtual
JsonObjectWriter
*
StartList
(
StringPiece
name
);
virtual
JsonObjectWriter
*
EndList
();
virtual
JsonObjectWriter
*
RenderBool
(
StringPiece
name
,
bool
value
);
virtual
JsonObjectWriter
*
RenderInt32
(
StringPiece
name
,
int32
value
);
virtual
JsonObjectWriter
*
RenderUint32
(
StringPiece
name
,
uint32
value
);
virtual
JsonObjectWriter
*
RenderInt64
(
StringPiece
name
,
int64
value
);
virtual
JsonObjectWriter
*
RenderUint64
(
StringPiece
name
,
uint64
value
);
virtual
JsonObjectWriter
*
RenderDouble
(
StringPiece
name
,
double
value
);
virtual
JsonObjectWriter
*
RenderFloat
(
StringPiece
name
,
float
value
);
virtual
JsonObjectWriter
*
RenderString
(
StringPiece
name
,
StringPiece
value
);
virtual
JsonObjectWriter
*
RenderBytes
(
StringPiece
name
,
StringPiece
value
);
virtual
JsonObjectWriter
*
RenderNull
(
StringPiece
name
);
JsonObjectWriter
*
StartObject
(
StringPiece
name
)
override
;
JsonObjectWriter
*
EndObject
()
override
;
JsonObjectWriter
*
StartList
(
StringPiece
name
)
override
;
JsonObjectWriter
*
EndList
()
override
;
JsonObjectWriter
*
RenderBool
(
StringPiece
name
,
bool
value
)
override
;
JsonObjectWriter
*
RenderInt32
(
StringPiece
name
,
int32
value
)
override
;
JsonObjectWriter
*
RenderUint32
(
StringPiece
name
,
uint32
value
)
override
;
JsonObjectWriter
*
RenderInt64
(
StringPiece
name
,
int64
value
)
override
;
JsonObjectWriter
*
RenderUint64
(
StringPiece
name
,
uint64
value
)
override
;
JsonObjectWriter
*
RenderDouble
(
StringPiece
name
,
double
value
)
override
;
JsonObjectWriter
*
RenderFloat
(
StringPiece
name
,
float
value
)
override
;
JsonObjectWriter
*
RenderString
(
StringPiece
name
,
StringPiece
value
)
override
;
JsonObjectWriter
*
RenderBytes
(
StringPiece
name
,
StringPiece
value
)
override
;
JsonObjectWriter
*
RenderNull
(
StringPiece
name
)
override
;
virtual
JsonObjectWriter
*
RenderNullAsEmpty
(
StringPiece
name
);
void
set_use_websafe_base64_for_bytes
(
bool
value
)
{
...
...
src/google/protobuf/util/json_util.cc
View file @
e242a9b7
...
...
@@ -129,9 +129,9 @@ class StatusErrorListener : public converter::ErrorListener {
util
::
Status
GetStatus
()
{
return
status_
;
}
v
irtual
v
oid
InvalidName
(
const
converter
::
LocationTrackerInterface
&
loc
,
StringPiece
unknown_name
,
StringPiece
message
)
{
void
InvalidName
(
const
converter
::
LocationTrackerInterface
&
loc
,
StringPiece
unknown_name
,
StringPiece
message
)
override
{
string
loc_string
=
GetLocString
(
loc
);
if
(
!
loc_string
.
empty
())
{
loc_string
.
append
(
" "
);
...
...
@@ -141,17 +141,17 @@ class StatusErrorListener : public converter::ErrorListener {
StrCat
(
loc_string
,
unknown_name
,
": "
,
message
));
}
v
irtual
v
oid
InvalidValue
(
const
converter
::
LocationTrackerInterface
&
loc
,
StringPiece
type_name
,
StringPiece
value
)
{
void
InvalidValue
(
const
converter
::
LocationTrackerInterface
&
loc
,
StringPiece
type_name
,
StringPiece
value
)
override
{
status_
=
util
::
Status
(
util
::
error
::
INVALID_ARGUMENT
,
StrCat
(
GetLocString
(
loc
),
": invalid value "
,
string
(
value
),
" for type "
,
string
(
type_name
)));
}
v
irtual
v
oid
MissingField
(
const
converter
::
LocationTrackerInterface
&
loc
,
StringPiece
missing_name
)
{
void
MissingField
(
const
converter
::
LocationTrackerInterface
&
loc
,
StringPiece
missing_name
)
override
{
status_
=
util
::
Status
(
util
::
error
::
INVALID_ARGUMENT
,
StrCat
(
GetLocString
(
loc
),
": missing field "
,
string
(
missing_name
)));
...
...
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