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
27b33623
Commit
27b33623
authored
Feb 01, 2018
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug pointed out by harris.
parent
8447ac76
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
array.h
c++/src/kj/array.h
+2
-2
No files found.
c++/src/kj/array.h
View file @
27b33623
...
...
@@ -870,7 +870,7 @@ template <typename... Attachments>
Array
<
T
>
ArrayPtr
<
T
>::
attach
(
Attachments
&&
...
attachments
)
const
{
T
*
ptrCopy
=
ptr
;
KJ_IREQUIRE
(
ptr
!=
nullptr
,
"cannot attach to null pointer"
);
KJ_IREQUIRE
(
ptr
Copy
!=
nullptr
,
"cannot attach to null pointer"
);
// HACK: If someone accidentally calls .attach() on a null pointer in opt mode, try our best to
// accomplish reasonable behavior: We turn the pointer non-null but still invalid, so that the
...
...
@@ -879,7 +879,7 @@ Array<T> ArrayPtr<T>::attach(Attachments&&... attachments) const {
auto
bundle
=
new
_
::
ArrayDisposableOwnedBundle
<
Attachments
...
>
(
kj
::
fwd
<
Attachments
>
(
attachments
)...);
return
Array
<
T
>
(
ptr
,
size_
,
*
bundle
);
return
Array
<
T
>
(
ptr
Copy
,
size_
,
*
bundle
);
}
}
// namespace kj
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