Skip to content

Commit

Permalink
Fixed incorrect descriptions of size_type in containers. (#270)
Browse files Browse the repository at this point in the history
  • Loading branch information
wmamrak authored and rparolin committed Mar 12, 2019
1 parent 4bb92c7 commit 2dc410a
Show file tree
Hide file tree
Showing 15 changed files with 24 additions and 25 deletions.
2 changes: 1 addition & 1 deletion doc/EASTL Glossary.html
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ <h1>EASTL Glossary</h1>
<tr>
<td>size_type</td>
<td>The type that a container uses to define its size and counts. This is similar to the C/C++ size_t type but may be
specialized for the container.</td>
specialized for the container. It defaults to size_t, but it is possible to force it to be 4 bytes for 64 bit machines by defining EASTL_SIZE_T_32BIT.</td>
</tr>
<tr>
<td>skip list</td>
Expand Down
3 changes: 1 addition & 2 deletions doc/EASTL Modules.html
Original file line number Diff line number Diff line change
Expand Up @@ -626,8 +626,7 @@ <h2>Module Behaviour</h2>
<li>Some overhead values are dependent on the structure alignment characteristics in effect. The values reported here
are those that would be in effect for a system that requires pointers to be aligned on boundaries of their size and
allocations with a minimum of 4 bytes (thus one byte values get rounded up to 4).</li>
<li>Some overhead values are dependent on the size_type used by containers. We assume a size_type of 4 bytes, even for
64 bit machines, as this is the EASTL default.</li>
<li>Some overhead values are dependent on the size_type used by containers. size_type defaults to size_t, but it is possible to force it to be 4 bytes for 64 bit machines by defining EASTL_SIZE_T_32BIT.</li>
<li>Inserting at the end of a vector may cause the vector to be resized; resizing a vector is O(n). However, the
amortized time complexity for vector insertions at the end is constant.</li>
<li>Sort assumes the usage of the best possible sort for a large container of random data. Some sort algorithms (e.g.
Expand Down
2 changes: 1 addition & 1 deletion include/EASTL/array.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ namespace eastl
typedef const value_type* const_iterator;
typedef eastl::reverse_iterator<iterator> reverse_iterator;
typedef eastl::reverse_iterator<const_iterator> const_reverse_iterator;
typedef eastl_size_t size_type; // See config.h for the definition of eastl_size_t, which defaults to uint32_t.
typedef eastl_size_t size_type; // See config.h for the definition of eastl_size_t, which defaults to size_t.
typedef ptrdiff_t difference_type;

public:
Expand Down
4 changes: 2 additions & 2 deletions include/EASTL/bonus/intrusive_sdlist.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ namespace eastl
typedef IntrusiveSDListIterator<T, Pointer, Reference> this_type;
typedef IntrusiveSDListIterator<T, T*, T&> iterator;
typedef IntrusiveSDListIterator<T, const T*, const T&> const_iterator;
typedef eastl_size_t size_type; // See config.h for the definition of eastl_size_t, which defaults to uint32_t.
typedef eastl_size_t size_type; // See config.h for the definition of eastl_size_t, which defaults to size_t.
typedef ptrdiff_t difference_type;
typedef T value_type;
typedef T node_type;
Expand Down Expand Up @@ -117,7 +117,7 @@ namespace eastl
class intrusive_sdlist_base
{
public:
typedef eastl_size_t size_type; // See config.h for the definition of eastl_size_t, which defaults to uint32_t.
typedef eastl_size_t size_type; // See config.h for the definition of eastl_size_t, which defaults to size_t.
typedef ptrdiff_t difference_type;

protected:
Expand Down
4 changes: 2 additions & 2 deletions include/EASTL/bonus/intrusive_slist.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace eastl
typedef IntrusiveSListIterator<T, Pointer, Reference> this_type;
typedef IntrusiveSListIterator<T, T*, T&> iterator;
typedef IntrusiveSListIterator<T, const T*, const T&> const_iterator;
typedef eastl_size_t size_type; // See config.h for the definition of eastl_size_t, which defaults to uint32_t.
typedef eastl_size_t size_type; // See config.h for the definition of eastl_size_t, which defaults to size_t.
typedef ptrdiff_t difference_type;
typedef T value_type;
typedef T node_type;
Expand Down Expand Up @@ -75,7 +75,7 @@ namespace eastl
class intrusive_slist_base
{
public:
typedef eastl_size_t size_type; // See config.h for the definition of eastl_size_t, which defaults to uint32_t.
typedef eastl_size_t size_type; // See config.h for the definition of eastl_size_t, which defaults to size_t.
typedef ptrdiff_t difference_type;

protected:
Expand Down
2 changes: 1 addition & 1 deletion include/EASTL/bonus/list_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ namespace eastl
typedef list_map_iterator<T, Pointer, Reference> this_type;
typedef list_map_iterator<T, T*, T&> iterator;
typedef list_map_iterator<T, const T*, const T&> const_iterator;
typedef eastl_size_t size_type; // See config.h for the definition of eastl_size_t, which defaults to uint32_t.
typedef eastl_size_t size_type; // See config.h for the definition of eastl_size_t, which defaults to size_t.
typedef ptrdiff_t difference_type;
typedef T value_type;
typedef list_map_data_base base_node_type;
Expand Down
8 changes: 4 additions & 4 deletions include/EASTL/bonus/sparse_matrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ namespace eastl
{
public:
typedef sparse_matrix_row_iterator<T> this_type;
typedef eastl_size_t size_type; // See config.h for the definition of eastl_size_t, which defaults to uint32_t.
typedef eastl_size_t size_type; // See config.h for the definition of eastl_size_t, which defaults to size_t.
typedef ptrdiff_t difference_type;
typedef T value_type;
typedef T& reference;
Expand Down Expand Up @@ -234,7 +234,7 @@ namespace eastl
{
public:
typedef sparse_matrix_col_iterator<T> this_type;
typedef eastl_size_t size_type; // See config.h for the definition of eastl_size_t, which defaults to uint32_t.
typedef eastl_size_t size_type; // See config.h for the definition of eastl_size_t, which defaults to size_t.
typedef ptrdiff_t difference_type;
typedef T value_type;
typedef T& reference;
Expand Down Expand Up @@ -359,7 +359,7 @@ namespace eastl
{
public:
typedef sparse_matrix_iterator<T> this_type;
typedef eastl_size_t size_type; // See config.h for the definition of eastl_size_t, which defaults to uint32_t.
typedef eastl_size_t size_type; // See config.h for the definition of eastl_size_t, which defaults to size_t.
typedef ptrdiff_t difference_type;
typedef T value_type;
typedef T& reference;
Expand Down Expand Up @@ -468,7 +468,7 @@ namespace eastl
typedef value_type& reference;
typedef const value_type& const_reference;
typedef ptrdiff_t difference_type;
typedef eastl_size_t size_type; // See config.h for the definition of eastl_size_t, which defaults to uint32_t.
typedef eastl_size_t size_type; // See config.h for the definition of eastl_size_t, which defaults to size_t.
typedef sparse_matrix_row_iterator<T> row_iterator;
typedef sparse_matrix_col_iterator<T> col_iterator;
typedef sparse_matrix_iterator<T> iterator;
Expand Down
2 changes: 1 addition & 1 deletion include/EASTL/deque.h
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ namespace eastl
{
typedef T value_type;
typedef Allocator allocator_type;
typedef eastl_size_t size_type; // See config.h for the definition of eastl_size_t, which defaults to uint32_t.
typedef eastl_size_t size_type; // See config.h for the definition of eastl_size_t, which defaults to size_t.
typedef ptrdiff_t difference_type;
typedef DequeIterator<T, T*, T&, kDequeSubarraySize> iterator;
typedef DequeIterator<T, const T*, const T&, kDequeSubarraySize> const_iterator;
Expand Down
4 changes: 2 additions & 2 deletions include/EASTL/internal/hashtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ namespace eastl

Value mValue;
hash_node* mpNext;
eastl_size_t mnHashCode; // See config.h for the definition of eastl_size_t, which defaults to uint32_t.
eastl_size_t mnHashCode; // See config.h for the definition of eastl_size_t, which defaults to size_t.
} EASTL_MAY_ALIAS;

template <typename Value>
Expand Down Expand Up @@ -839,7 +839,7 @@ namespace eastl
typedef Allocator allocator_type;
typedef Equal key_equal;
typedef ptrdiff_t difference_type;
typedef eastl_size_t size_type; // See config.h for the definition of eastl_size_t, which defaults to uint32_t.
typedef eastl_size_t size_type; // See config.h for the definition of eastl_size_t, which defaults to size_t.
typedef value_type& reference;
typedef const value_type& const_reference;
typedef node_iterator<value_type, !bMutableIterators, bCacheHashCode> local_iterator;
Expand Down
2 changes: 1 addition & 1 deletion include/EASTL/internal/intrusive_hashtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ namespace eastl
typedef uint32_t hash_code_t;
typedef Equal key_equal;
typedef ptrdiff_t difference_type;
typedef eastl_size_t size_type; // See config.h for the definition of eastl_size_t, which defaults to uint32_t.
typedef eastl_size_t size_type; // See config.h for the definition of eastl_size_t, which defaults to size_t.
typedef value_type& reference;
typedef const value_type& const_reference;
typedef intrusive_node_iterator<value_type, bConstIterators> local_iterator;
Expand Down
4 changes: 2 additions & 2 deletions include/EASTL/internal/red_black_tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ namespace eastl
typedef rbtree_iterator<T, Pointer, Reference> this_type;
typedef rbtree_iterator<T, T*, T&> iterator;
typedef rbtree_iterator<T, const T*, const T&> const_iterator;
typedef eastl_size_t size_type; // See config.h for the definition of eastl_size_t, which defaults to uint32_t.
typedef eastl_size_t size_type; // See config.h for the definition of eastl_size_t, which defaults to size_t.
typedef ptrdiff_t difference_type;
typedef T value_type;
typedef rbtree_node_base base_node_type;
Expand Down Expand Up @@ -334,7 +334,7 @@ namespace eastl
{
public:
typedef ptrdiff_t difference_type;
typedef eastl_size_t size_type; // See config.h for the definition of eastl_size_t, which defaults to uint32_t.
typedef eastl_size_t size_type; // See config.h for the definition of eastl_size_t, which defaults to size_t.
typedef Key key_type;
typedef Value value_type;
typedef rbtree_node<value_type> node_type;
Expand Down
2 changes: 1 addition & 1 deletion include/EASTL/intrusive_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ namespace eastl
class intrusive_list_base
{
public:
typedef eastl_size_t size_type; // See config.h for the definition of this, which defaults to uint32_t.
typedef eastl_size_t size_type; // See config.h for the definition of this, which defaults to size_t.
typedef ptrdiff_t difference_type;

protected:
Expand Down
4 changes: 2 additions & 2 deletions include/EASTL/list.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ namespace eastl
typedef ListIterator<T, Pointer, Reference> this_type;
typedef ListIterator<T, T*, T&> iterator;
typedef ListIterator<T, const T*, const T&> const_iterator;
typedef eastl_size_t size_type; // See config.h for the definition of eastl_size_t, which defaults to uint32_t.
typedef eastl_size_t size_type; // See config.h for the definition of eastl_size_t, which defaults to size_t.
typedef ptrdiff_t difference_type;
typedef T value_type;
typedef ListNode<T> node_type;
Expand Down Expand Up @@ -207,7 +207,7 @@ namespace eastl
typedef T value_type;
typedef Allocator allocator_type;
typedef ListNode<T> node_type;
typedef eastl_size_t size_type; // See config.h for the definition of eastl_size_t, which defaults to uint32_t.
typedef eastl_size_t size_type; // See config.h for the definition of eastl_size_t, which defaults to size_t.
typedef ptrdiff_t difference_type;
#if EASTL_LIST_PROXY_ENABLED
typedef ListNodeBaseProxy< ListNode<T> > base_node_type;
Expand Down
4 changes: 2 additions & 2 deletions include/EASTL/slist.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ namespace eastl
typedef SListIterator<T, Pointer, Reference> this_type;
typedef SListIterator<T, T*, T&> iterator;
typedef SListIterator<T, const T*, const T&> const_iterator;
typedef eastl_size_t size_type; // See config.h for the definition of eastl_size_t, which defaults to uint32_t.
typedef eastl_size_t size_type; // See config.h for the definition of eastl_size_t, which defaults to size_t.
typedef ptrdiff_t difference_type;
typedef T value_type;
typedef SListNode<T> node_type;
Expand Down Expand Up @@ -171,7 +171,7 @@ namespace eastl
public:
typedef Allocator allocator_type;
typedef SListNode<T> node_type;
typedef eastl_size_t size_type; // See config.h for the definition of eastl_size_t, which defaults to uint32_t.
typedef eastl_size_t size_type; // See config.h for the definition of eastl_size_t, which defaults to size_t.
typedef ptrdiff_t difference_type;
#if EASTL_LIST_PROXY_ENABLED
typedef SListNodeBaseProxy< SListNode<T> > base_node_type;
Expand Down
2 changes: 1 addition & 1 deletion include/EASTL/string.h
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ namespace eastl
typedef const T* const_iterator;
typedef eastl::reverse_iterator<iterator> reverse_iterator;
typedef eastl::reverse_iterator<const_iterator> const_reverse_iterator;
typedef eastl_size_t size_type; // See config.h for the definition of eastl_size_t, which defaults to uint32_t.
typedef eastl_size_t size_type; // See config.h for the definition of eastl_size_t, which defaults to size_t.
typedef ptrdiff_t difference_type;
typedef Allocator allocator_type;

Expand Down

0 comments on commit 2dc410a

Please sign in to comment.