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
6d9a226f
Commit
6d9a226f
authored
Oct 13, 2017
by
Stewart Miles
Committed by
GitHub
Oct 13, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4458 from a-maurice/master
Use flatbuffer unique_ptr instead of std's.
parents
a0e5d783
b0fd1a8c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
idl.h
include/flatbuffers/idl.h
+1
-1
stl_emulation.h
include/flatbuffers/stl_emulation.h
+1
-1
test.cpp
tests/test.cpp
+1
-1
No files found.
include/flatbuffers/idl.h
View file @
6d9a226f
...
...
@@ -284,7 +284,7 @@ struct StructDef : public Definition {
size_t
minalign
;
// What the whole object needs to be aligned to.
size_t
bytesize
;
// Size if fixed.
std
::
unique_ptr
<
std
::
string
>
original_location
;
flatbuffers
::
unique_ptr
<
std
::
string
>
original_location
;
};
inline
bool
IsStruct
(
const
Type
&
type
)
{
...
...
include/flatbuffers/stl_emulation.h
View file @
6d9a226f
...
...
@@ -170,7 +170,7 @@ inline void vector_emplace_back(std::vector<T> *vector, V &&data) {
return
*
this
;
}
const
T
&
operator
*
()
const
{
return
ptr_
;
}
const
T
&
operator
*
()
const
{
return
*
ptr_
;
}
T
*
operator
->
()
const
{
return
ptr_
;
}
T
*
get
()
const
noexcept
{
return
ptr_
;
}
explicit
operator
bool
()
const
{
return
ptr_
!=
nullptr
;
}
...
...
tests/test.cpp
View file @
6d9a226f
...
...
@@ -1661,7 +1661,7 @@ void FlexBuffersTest() {
int
ints
[]
=
{
1
,
2
,
3
};
slb2
.
Vector
(
"bar"
,
ints
,
3
);
slb2
.
FixedTypedVector
(
"bar3"
,
ints
,
3
);
slb
.
Bool
(
"bool"
,
true
);
slb
2
.
Bool
(
"bool"
,
true
);
slb2
.
Double
(
"foo"
,
100
);
slb2
.
Map
(
"mymap"
,
[](
flexbuffers
::
Builder
&
slb3
)
{
slb3
.
String
(
"foo"
,
"Fred"
);
// Testing key and string reuse.
...
...
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