| 192 | } |
| 193 | |
| 194 | void |
| 195 | Manager::commit () |
| 196 | { |
| 197 | if (m_enabled) { |
| 198 | |
| 199 | tl_assert (m_opened); |
| 200 | tl_assert (! m_replay); |
| 201 | m_opened = false; |
| 202 | |
| 203 | // delete transactions that are empty |
| 204 | if (m_current->first.begin () != m_current->first.end ()) { |
| 205 | ++m_current; |
| 206 | } else { |
| 207 | erase_transactions (m_current, m_transactions.end ()); |
| 208 | m_current = m_transactions.end (); |
| 209 | } |
| 210 | |
| 211 | } |
| 212 | } |
| 213 | |
| 214 | void |
| 215 | Manager::undo () |