aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--odb/details/shared-ptr/base.cxx5
-rw-r--r--odb/details/shared-ptr/base.hxx5
2 files changed, 5 insertions, 5 deletions
diff --git a/odb/details/shared-ptr/base.cxx b/odb/details/shared-ptr/base.cxx
index 254ba1e..3331db7 100644
--- a/odb/details/shared-ptr/base.cxx
+++ b/odb/details/shared-ptr/base.cxx
@@ -26,10 +26,7 @@ namespace odb
bool r (--counter_ == 0);
if (r)
- {
- callback_->zero_counter (callback_->arg);
- r = (counter_ == 0);
- }
+ r = callback_->zero_counter (callback_->arg);
return r;
}
diff --git a/odb/details/shared-ptr/base.hxx b/odb/details/shared-ptr/base.hxx
index e75fb4a..7cf44da 100644
--- a/odb/details/shared-ptr/base.hxx
+++ b/odb/details/shared-ptr/base.hxx
@@ -80,7 +80,10 @@ namespace odb
struct refcount_callback
{
void* arg;
- void (*zero_counter) (void*);
+
+ // Return true if the object should be deleted, false otherwise.
+ //
+ bool (*zero_counter) (void*);
};
private: