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
f4e4be63
Commit
f4e4be63
authored
Nov 30, 2015
by
Feng Xiao
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1011 from c0nk/wip-implicit-cast-fix
Fix some narrowing implicit casts [NFC]
parents
d3cb5f40
a52539a3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
coded_stream.h
src/google/protobuf/io/coded_stream.h
+2
-2
wire_format_lite_inl.h
src/google/protobuf/wire_format_lite_inl.h
+6
-4
No files found.
src/google/protobuf/io/coded_stream.h
View file @
f4e4be63
...
...
@@ -1035,7 +1035,7 @@ inline const uint8* CodedInputStream::ExpectTagFromArray(
inline
void
CodedInputStream
::
GetDirectBufferPointerInline
(
const
void
**
data
,
int
*
size
)
{
*
data
=
buffer_
;
*
size
=
buffer_end_
-
buffer_
;
*
size
=
static_cast
<
int
>
(
buffer_end_
-
buffer_
)
;
}
inline
bool
CodedInputStream
::
ExpectAtEnd
()
{
...
...
@@ -1231,7 +1231,7 @@ inline MessageFactory* CodedInputStream::GetExtensionFactory() {
}
inline
int
CodedInputStream
::
BufferSize
()
const
{
return
buffer_end_
-
buffer_
;
return
static_cast
<
int
>
(
buffer_end_
-
buffer_
)
;
}
inline
CodedInputStream
::
CodedInputStream
(
ZeroCopyInputStream
*
input
)
...
...
src/google/protobuf/wire_format_lite_inl.h
View file @
f4e4be63
...
...
@@ -835,12 +835,14 @@ inline int WireFormatLite::EnumSize(int value) {
}
inline
int
WireFormatLite
::
StringSize
(
const
string
&
value
)
{
return
io
::
CodedOutputStream
::
VarintSize32
(
value
.
size
())
+
value
.
size
();
return
static_cast
<
int
>
(
io
::
CodedOutputStream
::
VarintSize32
(
static_cast
<
uint32
>
(
value
.
size
()))
+
value
.
size
());
}
inline
int
WireFormatLite
::
BytesSize
(
const
string
&
value
)
{
return
io
::
CodedOutputStream
::
VarintSize32
(
value
.
size
())
+
value
.
size
();
return
static_cast
<
int
>
(
io
::
CodedOutputStream
::
VarintSize32
(
static_cast
<
uint32
>
(
value
.
size
()))
+
value
.
size
());
}
...
...
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