Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
flatbuffers
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
flatbuffers
Commits
a6d98fb0
Commit
a6d98fb0
authored
Feb 16, 2017
by
Wouter van Oortmerssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed VS x64 warnings in flexbuffers.h
parent
3a2d3a23
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
flexbuffers.h
include/flatbuffers/flexbuffers.h
+5
-4
No files found.
include/flatbuffers/flexbuffers.h
View file @
a6d98fb0
...
...
@@ -85,7 +85,7 @@ inline bool IsFixedTypedVector(Type t) {
return
t
>=
TYPE_VECTOR_INT2
&&
t
<=
TYPE_VECTOR_FLOAT4
;
}
inline
Type
ToTypedVector
(
Type
t
,
in
t
fixed_len
=
0
)
{
inline
Type
ToTypedVector
(
Type
t
,
size_
t
fixed_len
=
0
)
{
assert
(
IsTypedVectorElementType
(
t
));
switch
(
fixed_len
)
{
case
0
:
return
static_cast
<
Type
>
(
t
-
TYPE_INT
+
TYPE_VECTOR_INT
);
...
...
@@ -601,7 +601,7 @@ class Reference {
template
<
typename
T
>
bool
Mutate
(
const
uint8_t
*
dest
,
T
t
,
size_t
byte_width
,
BitWidth
value_width
)
{
auto
fits
=
(
1U
<<
value_width
)
<=
byte_width
;
auto
fits
=
static_cast
<
size_t
>
(
1U
<<
value_width
)
<=
byte_width
;
if
(
fits
)
{
t
=
flatbuffers
::
EndianScalar
(
t
);
memcpy
(
const_cast
<
uint8_t
*>
(
dest
),
&
t
,
byte_width
);
...
...
@@ -1082,7 +1082,7 @@ class Builder FLATBUFFERS_FINAL_CLASS {
}
// For values T >= byte_width
template
<
typename
T
>
void
Write
(
T
val
,
uint8
_t
byte_width
)
{
template
<
typename
T
>
void
Write
(
T
val
,
size
_t
byte_width
)
{
val
=
flatbuffers
::
EndianScalar
(
val
);
WriteBytes
(
&
val
,
byte_width
);
}
...
...
@@ -1176,7 +1176,8 @@ class Builder FLATBUFFERS_FINAL_CLASS {
auto
offset
=
offset_loc
-
u_
;
// Does it fit?
auto
bit_width
=
WidthU
(
offset
);
if
(
1U
<<
bit_width
==
byte_width
)
return
bit_width
;
if
(
static_cast
<
size_t
>
(
1U
<<
bit_width
)
==
byte_width
)
return
bit_width
;
}
assert
(
false
);
// Must match one of the sizes above.
return
BIT_WIDTH_64
;
...
...
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