From 30b664c0561cc9f6d2bd24f7bce9b6c57fb52320 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 15 Nov 2010 17:46:28 +0200 Subject: Add support for custom object pointers New option: --default-pointer. New object pragma specifier: pointer. --- odb/result.txx | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'odb/result.txx') diff --git a/odb/result.txx b/odb/result.txx index e58af1f..3068890 100644 --- a/odb/result.txx +++ b/odb/result.txx @@ -12,8 +12,8 @@ namespace odb } template - typename result_impl::pointer_type result_impl:: - current (bool release) + typename result_impl::pointer_type& result_impl:: + current () { if (pointer_traits::null_ptr (current_) && !end_) { @@ -21,14 +21,6 @@ namespace odb current (pointer_traits::get_ref (current_)); } - pointer_type r (current_); - - if (release) - { - current_ = pointer_type (); - guard_.release (); - } - - return r; + return current_; } } -- cgit v1.1