diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-11-15 17:46:28 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-11-15 17:46:28 +0200 |
commit | 30b664c0561cc9f6d2bd24f7bce9b6c57fb52320 (patch) | |
tree | 743ce4a41249c8586e81a001cf147bedfbdf9a85 /odb/result.txx | |
parent | 93392ca601a0cab8517a4ca8d163df4b41dd3e49 (diff) |
Add support for custom object pointers
New option: --default-pointer. New object pragma specifier: pointer.
Diffstat (limited to 'odb/result.txx')
-rw-r--r-- | odb/result.txx | 14 |
1 files changed, 3 insertions, 11 deletions
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 T> - typename result_impl<T>::pointer_type result_impl<T>:: - current (bool release) + typename result_impl<T>::pointer_type& result_impl<T>:: + 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_; } } |