aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-01-24 16:47:11 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-01-24 16:47:11 +0200
commit101c769144f4351388085917225ede383bebfb07 (patch)
tree6cf1d85111769803b1023b0de5bccbabac8a21bd
parent3674a82b9c09757b479e485a673a7a556f12284b (diff)
Rearrange function order to suppress MinGW export warnings1.1.0
-rw-r--r--odb/lazy-ptr-impl.ixx74
1 files changed, 37 insertions, 37 deletions
diff --git a/odb/lazy-ptr-impl.ixx b/odb/lazy-ptr-impl.ixx
index 72dc42e..985aa87 100644
--- a/odb/lazy-ptr-impl.ixx
+++ b/odb/lazy-ptr-impl.ixx
@@ -29,37 +29,28 @@ namespace odb
{
}
- inline lazy_ptr_base& lazy_ptr_base::
- operator= (const lazy_ptr_base& r)
+ inline void lazy_ptr_base::
+ reset_id ()
{
- if (id_ != r.id_)
- reset_ (r.db_, r.id_, r.free_, r.copy_);
- else
- db_ = r.db_;
+ if (id_)
+ free_ (id_);
- return *this;
+ id_ = 0;
}
- inline lazy_ptr_base& lazy_ptr_base::
- operator= (const lazy_ptr_impl_ref& r)
+ inline void lazy_ptr_base::
+ reset_ (database_type* db, const void* id, free_func free, copy_func copy)
{
- if (id_ != r.id_)
- {
- reset_id ();
- id_ = r.id_;
- free_ = r.free_;
- copy_ = r.copy_;
- }
-
- db_ = r.db_;
- return *this;
- }
+ void* idc (id ? copy (id) : 0);
- inline lazy_ptr_base::
- ~lazy_ptr_base ()
- {
if (id_)
free_ (id_);
+
+ free_ = free;
+ copy_ = copy;
+
+ id_ = idc;
+ db_ = db;
}
inline void lazy_ptr_base::
@@ -76,28 +67,37 @@ namespace odb
db_ = &db;
}
- inline void lazy_ptr_base::
- reset_id ()
+ inline lazy_ptr_base& lazy_ptr_base::
+ operator= (const lazy_ptr_base& r)
{
- if (id_)
- free_ (id_);
+ if (id_ != r.id_)
+ reset_ (r.db_, r.id_, r.free_, r.copy_);
+ else
+ db_ = r.db_;
- id_ = 0;
+ return *this;
}
- inline void lazy_ptr_base::
- reset_ (database_type* db, const void* id, free_func free, copy_func copy)
+ inline lazy_ptr_base& lazy_ptr_base::
+ operator= (const lazy_ptr_impl_ref& r)
{
- void* idc (id ? copy (id) : 0);
+ if (id_ != r.id_)
+ {
+ reset_id ();
+ id_ = r.id_;
+ free_ = r.free_;
+ copy_ = r.copy_;
+ }
+
+ db_ = r.db_;
+ return *this;
+ }
+ inline lazy_ptr_base::
+ ~lazy_ptr_base ()
+ {
if (id_)
free_ (id_);
-
- free_ = free;
- copy_ = copy;
-
- id_ = idc;
- db_ = db;
}
inline void lazy_ptr_base::