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
b3c35750
Unverified
Commit
b3c35750
authored
Jun 01, 2016
by
Martin Ankerl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
renamed functions
More descriptive name, show that it's really just a temporary object.
parent
023fec62
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
flatbuffers.h
include/flatbuffers/flatbuffers.h
+3
-3
No files found.
include/flatbuffers/flatbuffers.h
View file @
b3c35750
...
@@ -1153,13 +1153,13 @@ template<typename T> const T *GetRoot(const void *buf) {
...
@@ -1153,13 +1153,13 @@ template<typename T> const T *GetRoot(const void *buf) {
/// Helpers to get a typed pointer to objects that are currently beeing built.
/// Helpers to get a typed pointer to objects that are currently beeing built.
/// @warning Creating new objects will lead to reallocations and invalidates the pointer!
/// @warning Creating new objects will lead to reallocations and invalidates the pointer!
template
<
typename
T
>
T
*
GetMutable
Object
(
FlatBufferBuilder
&
fbb
,
Offset
<
T
>
offset
)
{
template
<
typename
T
>
T
*
GetMutable
TemporaryPointer
(
FlatBufferBuilder
&
fbb
,
Offset
<
T
>
offset
)
{
return
reinterpret_cast
<
T
*>
(
fbb
.
GetCurrentBufferPointer
()
+
return
reinterpret_cast
<
T
*>
(
fbb
.
GetCurrentBufferPointer
()
+
fbb
.
GetSize
()
-
offset
.
o
);
fbb
.
GetSize
()
-
offset
.
o
);
}
}
template
<
typename
T
>
const
T
*
Get
Object
(
FlatBufferBuilder
&
fbb
,
Offset
<
T
>
offset
)
{
template
<
typename
T
>
const
T
*
Get
TemporaryPointer
(
FlatBufferBuilder
&
fbb
,
Offset
<
T
>
offset
)
{
return
GetMutable
Object
<
T
>
(
fbb
,
offset
);
return
GetMutable
TemporaryPointer
<
T
>
(
fbb
,
offset
);
}
}
// Helper to see if the identifier in a buffer has the expected value.
// Helper to see if the identifier in a buffer has the expected value.
...
...
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