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
7fe28129
Commit
7fe28129
authored
Aug 07, 2017
by
Wouter van Oortmerssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed clang-tidy warnings.
Change-Id: Ib94ef29254c116b60e4ff298baa2ce323ac9655c Tested: on Linux.
parent
917ff81b
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
5 deletions
+5
-5
idl.h
include/flatbuffers/idl.h
+1
-1
monster_generated.h
samples/monster_generated.h
+2
-2
idl_gen_cpp.cpp
src/idl_gen_cpp.cpp
+1
-1
monster_test_generated.h
tests/monster_test_generated.h
+1
-1
No files found.
include/flatbuffers/idl.h
View file @
7fe28129
...
...
@@ -606,7 +606,7 @@ private:
size_t
&
count
,
ParseVectorDelimitersBody
body
,
void
*
state
);
FLATBUFFERS_CHECKED_ERROR
ParseVector
(
const
Type
&
type
,
uoffset_t
*
ovalue
);
FLATBUFFERS_CHECKED_ERROR
ParseNestedFlatbuffer
(
Value
&
val
,
FieldDef
*
field
,
size_t
parent_
fieldn
,
size_t
fieldn
,
const
StructDef
*
parent_struct_def
);
FLATBUFFERS_CHECKED_ERROR
ParseMetaData
(
SymbolTable
<
Value
>
*
attributes
);
FLATBUFFERS_CHECKED_ERROR
TryTypedValue
(
int
dtoken
,
bool
check
,
Value
&
e
,
...
...
samples/monster_generated.h
View file @
7fe28129
...
...
@@ -485,7 +485,7 @@ inline flatbuffers::Offset<Monster> CreateMonster(flatbuffers::FlatBufferBuilder
auto
_pos
=
_o
->
pos
?
_o
->
pos
.
get
()
:
0
;
auto
_mana
=
_o
->
mana
;
auto
_hp
=
_o
->
hp
;
auto
_name
=
_o
->
name
.
size
()
?
_fbb
.
CreateString
(
_o
->
name
)
:
0
;
auto
_name
=
_o
->
name
.
empty
()
?
0
:
_fbb
.
CreateString
(
_o
->
name
)
;
auto
_inventory
=
_o
->
inventory
.
size
()
?
_fbb
.
CreateVector
(
_o
->
inventory
)
:
0
;
auto
_color
=
_o
->
color
;
auto
_weapons
=
_o
->
weapons
.
size
()
?
_fbb
.
CreateVector
<
flatbuffers
::
Offset
<
Weapon
>>
(
_o
->
weapons
.
size
(),
[](
size_t
i
,
_VectorArgs
*
__va
)
{
return
CreateWeapon
(
*
__va
->
__fbb
,
__va
->
__o
->
weapons
[
i
].
get
(),
__va
->
__rehasher
);
},
&
_va
)
:
0
;
...
...
@@ -525,7 +525,7 @@ inline flatbuffers::Offset<Weapon> CreateWeapon(flatbuffers::FlatBufferBuilder &
(
void
)
_rehasher
;
(
void
)
_o
;
struct
_VectorArgs
{
flatbuffers
::
FlatBufferBuilder
*
__fbb
;
const
WeaponT
*
__o
;
const
flatbuffers
::
rehasher_function_t
*
__rehasher
;
}
_va
=
{
&
_fbb
,
_o
,
_rehasher
};
(
void
)
_va
;
auto
_name
=
_o
->
name
.
size
()
?
_fbb
.
CreateString
(
_o
->
name
)
:
0
;
auto
_name
=
_o
->
name
.
empty
()
?
0
:
_fbb
.
CreateString
(
_o
->
name
)
;
auto
_damage
=
_o
->
damage
;
return
MyGame
::
Sample
::
CreateWeapon
(
_fbb
,
...
...
src/idl_gen_cpp.cpp
View file @
7fe28129
...
...
@@ -1772,7 +1772,7 @@ class CppGenerator : public BaseGenerator {
// For optional fields, check to see if there actually is any data
// in _o->field before attempting to access it.
if
(
!
field
.
required
)
{
code
=
value
+
".
size() ? "
+
code
+
" : 0"
;
code
=
value
+
".
empty() ? 0 : "
+
code
;
}
break
;
}
...
...
tests/monster_test_generated.h
View file @
7fe28129
...
...
@@ -1499,7 +1499,7 @@ inline flatbuffers::Offset<Stat> CreateStat(flatbuffers::FlatBufferBuilder &_fbb
(
void
)
_rehasher
;
(
void
)
_o
;
struct
_VectorArgs
{
flatbuffers
::
FlatBufferBuilder
*
__fbb
;
const
StatT
*
__o
;
const
flatbuffers
::
rehasher_function_t
*
__rehasher
;
}
_va
=
{
&
_fbb
,
_o
,
_rehasher
};
(
void
)
_va
;
auto
_id
=
_o
->
id
.
size
()
?
_fbb
.
CreateString
(
_o
->
id
)
:
0
;
auto
_id
=
_o
->
id
.
empty
()
?
0
:
_fbb
.
CreateString
(
_o
->
id
)
;
auto
_val
=
_o
->
val
;
auto
_count
=
_o
->
count
;
return
MyGame
::
Example
::
CreateStat
(
...
...
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