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
b4596f8e
Commit
b4596f8e
authored
Oct 30, 2019
by
Christian Maurer
Committed by
Adam Cozzette
Dec 06, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
treat enum,bool as 32bit; shrink ReadVarint32
parent
91ed6dcb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
map_type_handler.h
src/google/protobuf/map_type_handler.h
+2
-2
parse_context.h
src/google/protobuf/parse_context.h
+2
-2
No files found.
src/google/protobuf/map_type_handler.h
View file @
b4596f8e
...
...
@@ -467,11 +467,11 @@ inline const char* ReadSINT32(const char* ptr, int32* value) {
}
template
<
typename
E
>
inline
const
char
*
ReadENUM
(
const
char
*
ptr
,
E
*
value
)
{
*
value
=
static_cast
<
E
>
(
ReadVarint
64
(
&
ptr
));
*
value
=
static_cast
<
E
>
(
ReadVarint
32
(
&
ptr
));
return
ptr
;
}
inline
const
char
*
ReadBOOL
(
const
char
*
ptr
,
bool
*
value
)
{
*
value
=
static_cast
<
bool
>
(
ReadVarint
64
(
&
ptr
));
*
value
=
static_cast
<
bool
>
(
ReadVarint
32
(
&
ptr
));
return
ptr
;
}
...
...
src/google/protobuf/parse_context.h
View file @
b4596f8e
...
...
@@ -586,9 +586,9 @@ inline uint64 ReadVarint64(const char** p) {
}
inline
uint32
ReadVarint32
(
const
char
**
p
)
{
uint
64
tmp
;
uint
32
tmp
;
*
p
=
VarintParse
(
*
p
,
&
tmp
);
return
static_cast
<
uint32
>
(
tmp
)
;
return
tmp
;
}
inline
int64
ReadVarintZigZag64
(
const
char
**
p
)
{
...
...
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