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
d798100b
Commit
d798100b
authored
Feb 15, 2017
by
Sahil Jain
Committed by
Wouter van Oortmerssen
Feb 15, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Round vector_downward initial size up (#4179)
parent
1fb6b9ee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
flatbuffers.h
include/flatbuffers/flatbuffers.h
+3
-4
No files found.
include/flatbuffers/flatbuffers.h
View file @
d798100b
...
...
@@ -496,12 +496,11 @@ class vector_downward {
public
:
explicit
vector_downward
(
size_t
initial_size
,
const
simple_allocator
&
allocator
)
:
reserved_
(
initial_size
),
:
reserved_
((
initial_size
+
sizeof
(
largest_scalar_t
)
-
1
)
&
~
(
sizeof
(
largest_scalar_t
)
-
1
)),
buf_
(
allocator
.
allocate
(
reserved_
)),
cur_
(
buf_
+
reserved_
),
allocator_
(
allocator
)
{
assert
((
initial_size
&
(
sizeof
(
largest_scalar_t
)
-
1
))
==
0
);
}
allocator_
(
allocator
)
{}
~
vector_downward
()
{
if
(
buf_
)
...
...
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