Skip to content

Commit

Permalink
Using of qualified eastl move() and forward() functions. (#405)
Browse files Browse the repository at this point in the history
  • Loading branch information
miherius committed Nov 27, 2020
1 parent 3da94c9 commit 08e32c4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions include/EASTL/internal/hashtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -2702,7 +2702,7 @@ namespace eastl
hashtable<K, V, A, EK, Eq, H1, H2, H, RP, bC, bM, bU>::try_emplace(const key_type& key, Args&&... args)
{
return DoInsertValue(has_unique_keys_type(), piecewise_construct, forward_as_tuple(key),
forward_as_tuple(forward<Args>(args)...));
forward_as_tuple(eastl::forward<Args>(args)...));
}

template <typename K, typename V, typename A, typename EK, typename Eq,
Expand All @@ -2713,7 +2713,7 @@ namespace eastl
hashtable<K, V, A, EK, Eq, H1, H2, H, RP, bC, bM, bU>::try_emplace(key_type&& key, Args&&... args)
{
return DoInsertValue(has_unique_keys_type(), piecewise_construct, forward_as_tuple(eastl::move(key)),
forward_as_tuple(forward<Args>(args)...));
forward_as_tuple(eastl::forward<Args>(args)...));
}

template <typename K, typename V, typename A, typename EK, typename Eq,
Expand All @@ -2724,7 +2724,7 @@ namespace eastl
{
insert_return_type result = DoInsertValue(
has_unique_keys_type(),
value_type(piecewise_construct, forward_as_tuple(key), forward_as_tuple(forward<Args>(args)...)));
value_type(piecewise_construct, forward_as_tuple(key), forward_as_tuple(eastl::forward<Args>(args)...)));

return DoGetResultIterator(has_unique_keys_type(), result);
}
Expand All @@ -2737,7 +2737,7 @@ namespace eastl
{
insert_return_type result =
DoInsertValue(has_unique_keys_type(), value_type(piecewise_construct, forward_as_tuple(eastl::move(key)),
forward_as_tuple(forward<Args>(args)...)));
forward_as_tuple(eastl::forward<Args>(args)...)));

return DoGetResultIterator(has_unique_keys_type(), result);
}
Expand Down
8 changes: 4 additions & 4 deletions include/EASTL/internal/red_black_tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -1105,15 +1105,15 @@ namespace eastl
inline eastl::pair<typename rbtree<K, V, C, A, E, bM, bU>::iterator, bool>
rbtree<K, V, C, A, E, bM, bU>::try_emplace(const key_type& key, Args&&... args)
{
return DoInsertValue(has_unique_keys_type(), piecewise_construct, forward_as_tuple(key), forward_as_tuple(forward<Args>(args)...));
return DoInsertValue(has_unique_keys_type(), piecewise_construct, forward_as_tuple(key), forward_as_tuple(eastl::forward<Args>(args)...));
}

template <typename K, typename V, typename C, typename A, typename E, bool bM, bool bU>
template <class... Args>
inline eastl::pair<typename rbtree<K, V, C, A, E, bM, bU>::iterator, bool>
rbtree<K, V, C, A, E, bM, bU>::try_emplace(key_type&& key, Args&&... args)
{
return DoInsertValue(has_unique_keys_type(), piecewise_construct, forward_as_tuple(eastl::move(key)), forward_as_tuple(forward<Args>(args)...));
return DoInsertValue(has_unique_keys_type(), piecewise_construct, forward_as_tuple(eastl::move(key)), forward_as_tuple(eastl::forward<Args>(args)...));
}

template <typename K, typename V, typename C, typename A, typename E, bool bM, bool bU>
Expand All @@ -1123,7 +1123,7 @@ namespace eastl
{
return DoInsertValueHint(
has_unique_keys_type(), position,
piecewise_construct, forward_as_tuple(key), forward_as_tuple(forward<Args>(args)...));
piecewise_construct, forward_as_tuple(key), forward_as_tuple(eastl::forward<Args>(args)...));
}

template <typename K, typename V, typename C, typename A, typename E, bool bM, bool bU>
Expand All @@ -1133,7 +1133,7 @@ namespace eastl
{
return DoInsertValueHint(
has_unique_keys_type(), position,
piecewise_construct, forward_as_tuple(eastl::move(key)), forward_as_tuple(forward<Args>(args)...));
piecewise_construct, forward_as_tuple(eastl::move(key)), forward_as_tuple(eastl::forward<Args>(args)...));
}


Expand Down
6 changes: 3 additions & 3 deletions include/EASTL/utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ namespace eastl
template <typename T1, typename T2>
static EA_CONSTEXPR T1&& getInternal(pair<T1, T2>&& p)
{
return forward<T1>(p.first);
return eastl::forward<T1>(p.first);
}
};

Expand All @@ -811,7 +811,7 @@ namespace eastl
template <typename T1, typename T2>
static EA_CONSTEXPR T2&& getInternal(pair<T1, T2>&& p)
{
return forward<T2>(p.second);
return eastl::forward<T2>(p.second);
}
};

Expand All @@ -830,7 +830,7 @@ namespace eastl
template <size_t I, typename T1, typename T2>
tuple_element_t<I, pair<T1, T2>>&& get(pair<T1, T2>&& p)
{
return GetPair<I>::getInternal(move(p));
return GetPair<I>::getInternal(eastl::move(p));
}

#endif // EASTL_TUPLE_ENABLED
Expand Down

0 comments on commit 08e32c4

Please sign in to comment.