Removed redundant spaces
[libcds.git] / cds / container / details / bronson_avltree_base.h
index 7b5273d996e482e8ff3271b0320489f2e6d45c85..822c204bff1e603ca3f602721e14611f527585b2 100644 (file)
@@ -1,4 +1,32 @@
-//$$CDS-header$$
+/*
+    This file is a part of libcds - Concurrent Data Structures library
+
+    (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016
+
+    Source code repo: http://github.com/khizmax/libcds/
+    Download: http://sourceforge.net/projects/libcds/files/
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice, this
+      list of conditions and the following disclaimer.
+
+    * Redistributions in binary form must reproduce the above copyright notice,
+      this list of conditions and the following disclaimer in the documentation
+      and/or other materials provided with the distribution.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+    FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+    SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+    CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+    OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
 
 #ifndef CDSLIB_CONTAINER_DETAILS_BRONSON_AVLTREE_BASE_H
 #define CDSLIB_CONTAINER_DETAILS_BRONSON_AVLTREE_BASE_H
@@ -13,9 +41,6 @@ namespace cds { namespace container {
 
     /// BronsonAVLTree related declarations
     namespace bronson_avltree {
-        //@cond
-        struct implementation_tag;
-        //@endcond
 
         template <typename Key, typename T, typename SyncMonitor >
         struct node;
@@ -112,7 +137,7 @@ namespace cds { namespace container {
             void wait_until_shrink_completed( atomics::memory_order order ) const
             {
                 BackOff bkoff;
-                while ( is_shrinking( order ) )
+                while ( is_shrinking( order ))
                     bkoff();
             }
 
@@ -160,14 +185,14 @@ namespace cds { namespace container {
             template <typename Q>
             node( Q&& key )
                 : base_class()
-                , m_key( std::forward<Q>( key ) )
+                , m_key( std::forward<Q>( key ))
                 , m_pNextRemoved( nullptr )
             {}
 
             template <typename Q>
             node( Q&& key, int nHeight, version_type version, node * pParent, node * pLeft, node * pRight )
                 : base_class( nHeight, version, pParent, pLeft, pRight )
-                , m_key( std::forward<Q>( key ) )
+                , m_key( std::forward<Q>( key ))
                 , m_pNextRemoved( nullptr )
             {}
             //@endcond
@@ -343,7 +368,7 @@ namespace cds { namespace container {
             that can lead to lock contention.
 
             When this option is enabled, the new node is created before locking the parent node.
-            After that, the parent is locked and checked whether the new node may be attached to the parent.
+            After that, the parent is locked and checked whether the new node can be attached to the parent.
             In this case, false node creating can be performed, but locked section can be significantly small.
         */
         template <bool Enable>
@@ -455,11 +480,11 @@ namespace cds { namespace container {
             - \p opt::node_allocator - the allocator for internal nodes. Default is \ref CDS_DEFAULT_ALLOCATOR.
             - \p opt::allocator - the allocator for node's value. Default is \ref CDS_DEFAULT_ALLOCATOR.
                 This option is not used in \p BronsonAVLTreeMap<RCU, Key, T*, Traits> specialisation
-            - \ref cds::intrusive::opt::disposer "container::opt::disposer" - the functor used for dispose removed values.
+            - \p cds::intrusive::opt::disposer - the functor used for dispose removed values.
                 The user-provided disposer is used only for pointer-oriented tree specialization
                 like \p BronsonAVLTreeMap<GC, Key, T*, Traits>. When the node becomes the rounting node without value,
                 the disposer will be called to signal that the memory for the value can be safely freed.
-                Default is \ref cds::intrusive::opt::delete_disposer "cds::container::opt::v::delete_disposer<>" which calls \p delete operator.
+                Default is \p cds::intrusive::opt::delete_disposer which calls \p delete operator.
                 Due the nature of GC schema the disposer may be called asynchronously.
             - \p opt::sync_monitor -  @ref cds_sync_monitor "synchronization monitor" type for node-level locking,
                 default is \p cds::sync::injecting_monitor<cds::sync::spin>