projects
/
libcds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
movable guarded_ptr: unit tests
[libcds.git]
/
tests
/
unit
/
pqueue
/
skiplist_pqueue.h
diff --git
a/tests/unit/pqueue/skiplist_pqueue.h
b/tests/unit/pqueue/skiplist_pqueue.h
index 92ef9df04d0e92acf49c074d53caf14e087c4fed..0ca4e1b8632f3c3bd2e0dc25221edf3ba61e3ea2 100644
(file)
--- a/
tests/unit/pqueue/skiplist_pqueue.h
+++ b/
tests/unit/pqueue/skiplist_pqueue.h
@@
-20,11
+20,10
@@
namespace pqueue {
template <typename T, typename Set>
bool operator()( T& dest, Set& container ) const
{
template <typename T, typename Set>
bool operator()( T& dest, Set& container ) const
{
- typename Set::guarded_ptr gp;
- bool bRet = container.extract_max( gp );
- if ( bRet )
+ typename Set::guarded_ptr gp( container.extract_max());
+ if ( gp )
dest = *gp;
dest = *gp;
- return
bRet
;
+ return
!gp.empty()
;
}
};
}
};
@@
-47,11
+46,10
@@
namespace pqueue {
template <typename T, typename Set>
bool operator()( T& dest, Set& container ) const
{
template <typename T, typename Set>
bool operator()( T& dest, Set& container ) const
{
- typename Set::guarded_ptr gp;
- bool bRet = container.extract_min( gp );
- if ( bRet )
+ typename Set::guarded_ptr gp( container.extract_min());
+ if ( gp )
dest = *gp;
dest = *gp;
- return
bRet
;
+ return
!gp.empty()
;
}
};
}
};