Fixed a bug in update() function
authorkhizmax <libcds.dev@gmail.com>
Tue, 15 Sep 2015 21:09:38 +0000 (00:09 +0300)
committerkhizmax <libcds.dev@gmail.com>
Tue, 15 Sep 2015 21:09:38 +0000 (00:09 +0300)
cds/container/lazy_kvlist_nogc.h

index 4399ee5f314867e19d7873a7139d40c93584f514..1cf0729af27543fc03b66f91bff8f080108aad62 100644 (file)
@@ -546,10 +546,10 @@ namespace cds { namespace container {
             std::pair<bool, bool> ret = base_class::update_at( &refHead, *pNode,
                 [&pItemFound](bool, node_type& item, node_type&){ pItemFound = &item; },
                 bAllowInsert );
-            if ( ret.first && ret.second )
+
+            if ( ret.second )
                 pNode.release();
 
-            assert( pItemFound != nullptr );
             return std::make_pair( pItemFound, ret.second );
         }