[libc++] Fix some one-off typos in comments. NFCI.
authorArthur O'Dwyer <arthur.j.odwyer@gmail.com>
Sat, 12 Dec 2020 16:57:32 +0000 (11:57 -0500)
committerArthur O'Dwyer <arthur.j.odwyer@gmail.com>
Mon, 14 Dec 2020 14:54:58 +0000 (09:54 -0500)
libcxx/include/__hash_table
libcxx/include/__tree
libcxx/include/algorithm
libcxx/include/list
libcxx/include/optional
libcxx/include/semaphore

index ab45277..521ebbf 100644 (file)
@@ -1929,7 +1929,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_insert_unique(__node_pointer __
 // Prepare the container for an insertion of the value __cp_val with the hash
 // __cp_hash. This does a lookup into the container to see if __cp_value is
 // already present, and performs a rehash if necessary. Returns a pointer to the
-// last occurance of __cp_val in the map.
+// last occurrence of __cp_val in the map.
 //
 // Note that this function does forward exceptions if key_eq() throws, and never
 // mutates __value or actually inserts into the map.
index 26c4c41..d1bfccf 100644 (file)
@@ -1428,7 +1428,7 @@ private:
     __node_base_pointer&
         __find_leaf(const_iterator __hint,
                     __parent_pointer& __parent, const key_type& __v);
-    // FIXME: Make this function const qualified. Unfortunetly doing so
+    // FIXME: Make this function const qualified. Unfortunately doing so
     // breaks existing code which uses non-const callable comparators.
     template <class _Key>
     __node_base_pointer&
index bba8f3a..b1771a1 100644 (file)
@@ -4056,7 +4056,7 @@ __sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __c
                         ++__i;
                     }
                     // [__first, __i) == *__first and *__first < [__i, __last)
-                    // The first part is sorted, sort the secod part
+                    // The first part is sorted, sort the second part
                     // _VSTD::__sort<_Compare>(__i, __last, __comp);
                     __first = __i;
                     goto __restart;
@@ -4564,7 +4564,7 @@ __inplace_merge(_BidirectionalIterator __first, _BidirectionalIterator __middle,
         // swap middle two partitions
         __middle = _VSTD::rotate(__m1, __middle, __m2);
         // __len12 and __len21 now have swapped meanings
-        // merge smaller range with recurisve call and larger with tail recursion elimination
+        // merge smaller range with recursive call and larger with tail recursion elimination
         if (__len11 + __len21 < __len12 + __len22)
         {
             _VSTD::__inplace_merge<_Compare>(__first, __m1, __middle, __comp, __len11, __len21, __buff, __buff_size);
index a71f46f..a18514d 100644 (file)
@@ -2056,7 +2056,7 @@ list<_Tp, _Alloc>::splice(const_iterator __p, list& __c, const_iterator __i)
         " referring to list argument");
     _LIBCPP_ASSERT(__get_const_db()->__dereferenceable(&__i),
         "list::splice(iterator, list, iterator) called with second iterator not"
-        " derefereceable");
+        " dereferenceable");
 #endif
     if (__p.__ptr_ != __i.__ptr_ && __p.__ptr_ != __i.__ptr_->__next_)
     {
index 6cd5148..570fa11 100644 (file)
@@ -657,7 +657,7 @@ private:
       }
       template <class _Up, class _QUp = _QualUp>
       static constexpr bool __enable_assign() {
-          // Construction and assignability of _Qup to _Tp has already been
+          // Construction and assignability of _QUp to _Tp has already been
           // checked.
           return !__check_constructible_from_opt<_Up>::value &&
               !__check_assignable_from_opt<_Up>::value;
index 0943606..0e0434f 100644 (file)
@@ -71,7 +71,7 @@ __atomic_semaphore_base is the general-case implementation, to be used for
 user-requested least-max values that exceed the OS implementation support
 (incl. when the OS has no support of its own) and for binary semaphores.
 
-It is a typical Dijsktra semaphore algorithm over atomics, wait and notify
+It is a typical Dijkstra semaphore algorithm over atomics, wait and notify
 functions. It avoids contention against users' own use of those facilities.
 
 */