Skip to content

Commit 70626e2

Browse files
committed
Use emplace() in sharing_nodet
1 parent 711c7e3 commit 70626e2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/util/sharing_node.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,8 @@ SN_TYPE_PAR_DEF class sharing_nodet
300300
PRECONDITION(empty() || as_const(this)->find_leaf(k) == nullptr);
301301

302302
leaf_listt &c = get_container();
303-
c.push_front(leaft(k, std::forward<valueU>(v)));
303+
c.emplace_front(k, std::forward<valueU>(v));
304+
SN_ASSERT(c.front().is_defined_leaf());
304305

305306
return &c.front();
306307
}

0 commit comments

Comments
 (0)