Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
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
capnproto
Commits
f86ebf44
Commit
f86ebf44
authored
Mar 26, 2016
by
Kenton Varda
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #299 from maurer/uninitialized_listbuilder
Fix uninitialized members of ListBuilder
parents
e1d2d0a7
47b92d31
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
layout.c++
c++/src/capnp/layout.c++
+1
-0
layout.h
c++/src/capnp/layout.h
+2
-1
No files found.
c++/src/capnp/layout.c++
View file @
f86ebf44
...
...
@@ -1609,6 +1609,7 @@ struct WireHelpers {
return
{
segment
,
ptr
};
}
else
{
// List of structs.
KJ_DASSERT
(
value
.
structDataSize
%
BITS_PER_WORD
==
0
*
BITS
);
word
*
ptr
=
allocate
(
ref
,
segment
,
capTable
,
totalSize
+
POINTER_SIZE_IN_WORDS
,
WirePointer
::
LIST
,
orphanArena
);
ref
->
listRef
.
setInlineComposite
(
totalSize
);
...
...
c++/src/capnp/layout.h
View file @
f86ebf44
...
...
@@ -643,7 +643,8 @@ class ListBuilder: public kj::DisallowConstCopy {
public
:
inline
explicit
ListBuilder
(
ElementSize
elementSize
)
:
segment
(
nullptr
),
capTable
(
nullptr
),
ptr
(
nullptr
),
elementCount
(
0
*
ELEMENTS
),
step
(
0
*
BITS
/
ELEMENTS
),
elementSize
(
elementSize
)
{}
step
(
0
*
BITS
/
ELEMENTS
),
elementSize
(
elementSize
),
structDataSize
(
0
*
BITS
),
structPointerCount
(
0
*
POINTERS
)
{}
MSVC_DEFAULT_ASSIGNMENT_WORKAROUND
(,
ListBuilder
)
...
...
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