projects
/
platform
/
upstream
/
libzypp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c4277d0
)
classify NULL Ptr as unique
author
Michael Andres
<ma@suse.de>
Thu, 23 Mar 2006 12:40:22 +0000
(12:40 +0000)
committer
Michael Andres
<ma@suse.de>
Thu, 23 Mar 2006 12:40:22 +0000
(12:40 +0000)
zypp/base/PtrTypes.h
patch
|
blob
|
history
diff --git
a/zypp/base/PtrTypes.h
b/zypp/base/PtrTypes.h
index
f2debfe
..
e3fe94f
100644
(file)
--- a/
zypp/base/PtrTypes.h
+++ b/
zypp/base/PtrTypes.h
@@
-79,9
+79,9
@@
namespace zypp
typedef shared_ptr<const _D> _constPtr;
/** Check whether pointer is not shared. */
bool unique( const _constPtr & ptr_r )
- { return ptr_r.unique(); }
+ { return
!ptr_r ||
ptr_r.unique(); }
bool unique( const _Ptr & ptr_r )
- { return ptr_r.unique(); }
+ { return
!ptr_r ||
ptr_r.unique(); }
/** Return number of references. */
long use_count( const _constPtr & ptr_r ) const
{ return ptr_r.use_count(); }