diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2024-01-17 21:11:21 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2024-01-17 21:11:21 +0300 |
commit | 0074faad1b27f3cd52a606c438e4f1375956d731 (patch) | |
tree | 96befa66d0e56d2726a3c041cc6b24015f1356dd | |
parent | 820e6f06f3fcd70f4c4ba94112d678188f1f59fe (diff) |
-rw-r--r-- | odb/vector-impl.ixx | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/odb/vector-impl.ixx b/odb/vector-impl.ixx index 1c0ee90..21999d5 100644 --- a/odb/vector-impl.ixx +++ b/odb/vector-impl.ixx @@ -18,6 +18,16 @@ namespace odb { } + inline void vector_impl:: + swap (vector_impl& x) + { + std::swap (state_, x.state_); + std::swap (size_, x.size_); + std::swap (tail_, x.tail_); + std::swap (capacity_, x.capacity_); + std::swap (data_, x.data_); + } + #ifdef ODB_CXX11 inline vector_impl:: vector_impl (vector_impl&& x) noexcept @@ -36,16 +46,6 @@ namespace odb } inline void vector_impl:: - swap (vector_impl& x) - { - std::swap (state_, x.state_); - std::swap (size_, x.size_); - std::swap (tail_, x.tail_); - std::swap (capacity_, x.capacity_); - std::swap (data_, x.data_); - } - - inline void vector_impl:: reserve (std::size_t n) { if (n > capacity_) @@ -146,6 +146,17 @@ namespace odb inline vector_base:: vector_base (): tran_ (0) {} + inline void vector_base:: + _arm (transaction& t) const + { + tran_ = &t; + t.callback_register (&rollback, + const_cast<vector_base*> (this), + transaction::event_rollback, + 0, + &tran_); + } + inline vector_base:: vector_base (const vector_base& x) : impl_ (x.impl_), tran_ (0) @@ -196,15 +207,4 @@ namespace odb { return impl_.tracking (); } - - inline void vector_base:: - _arm (transaction& t) const - { - tran_ = &t; - t.callback_register (&rollback, - const_cast<vector_base*> (this), - transaction::event_rollback, - 0, - &tran_); - } } |