mirror of
https://github.com/matrix-construct/construct
synced 2024-06-02 18:18:56 +02:00
ircd::json::stack: Add checkpoint ctor option for initial commitment state.
This commit is contained in:
parent
9f534dea17
commit
a9a6adf28d
|
@ -247,7 +247,7 @@ struct ircd::json::stack::checkpoint
|
|||
bool recommit();
|
||||
bool rollback();
|
||||
|
||||
checkpoint(stack &s);
|
||||
checkpoint(stack &s, const bool &committed = true);
|
||||
checkpoint(checkpoint &&) = delete;
|
||||
checkpoint(const checkpoint &) = delete;
|
||||
~checkpoint() noexcept;
|
||||
|
|
|
@ -1458,7 +1458,8 @@ ircd::json::stack::member::_post_append()
|
|||
// stack::checkpoint
|
||||
//
|
||||
|
||||
ircd::json::stack::checkpoint::checkpoint(stack &s)
|
||||
ircd::json::stack::checkpoint::checkpoint(stack &s,
|
||||
const bool &committed)
|
||||
:s{&s}
|
||||
,pc{s.cp}
|
||||
,point
|
||||
|
@ -1481,6 +1482,10 @@ ircd::json::stack::checkpoint::checkpoint(stack &s)
|
|||
top.m->vc:
|
||||
0;
|
||||
}()}
|
||||
,committed
|
||||
{
|
||||
committed
|
||||
}
|
||||
{
|
||||
s.cp = this;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue