Skip to content

Commit 5607f39

Browse files
committed
Use emplace() in sharing_nodet
1 parent 2807cb6 commit 5607f39

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
@@ -298,7 +298,8 @@ SN_TYPE_PAR_DEF class sharing_nodet
298298
PRECONDITION(empty() || as_const(this)->find_leaf(k) == nullptr);
299299

300300
leaf_listt &c = get_container();
301-
c.push_front(leaft(k, std::forward<valueU>(v)));
301+
c.emplace_front(k, std::forward<valueU>(v));
302+
SN_ASSERT(c.front().is_defined_leaf());
302303

303304
return &c.front();
304305
}

0 commit comments

Comments
 (0)