From 0074faad1b27f3cd52a606c438e4f1375956d731 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 17 Jan 2024 21:11:21 +0300 Subject: Reorder functions to help MinGW GCC with DLL symbol exporting --- odb/vector-impl.ixx | 42 +++++++++++++++++++++--------------------- 1 file 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 (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 (this), - transaction::event_rollback, - 0, - &tran_); - } } -- cgit v1.1