[DEV] add pushFront API for vector
This commit is contained in:
parent
3b6cd4880c
commit
28d5740bf5
20
etk/Vector.h
20
etk/Vector.h
@ -391,6 +391,23 @@ namespace etk
|
|||||||
#endif
|
#endif
|
||||||
return m_data[pos];
|
return m_data[pos];
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @brief Add at the First position of the Vector
|
||||||
|
* @param[in] item Element to add at the end of vector
|
||||||
|
*/
|
||||||
|
void PushFront(const MY_TYPE& item)
|
||||||
|
{
|
||||||
|
Insert(0, &item, 1);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @brief Add at the Last position of the Vector
|
||||||
|
* @param[in] item Pointer on a list of Element to add at the start of vector
|
||||||
|
* @param[in] nbElement Number of element to add.
|
||||||
|
*/
|
||||||
|
void PushFront(const MY_TYPE * item, int32_t nbElement)
|
||||||
|
{
|
||||||
|
Insert(0, item, nbElement);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* @brief Add at the Last position of the Vector
|
* @brief Add at the Last position of the Vector
|
||||||
* @param[in] item Element to add at the end of vector
|
* @param[in] item Element to add at the end of vector
|
||||||
@ -407,7 +424,8 @@ namespace etk
|
|||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @brief Add at the Last position of the Vector
|
* @brief Add at the Last position of the Vector
|
||||||
* @param[in] item Element to add at the end of vector
|
* @param[in] item Pointer on a list of Element to add at the end of vector
|
||||||
|
* @param[in] nbElement Number of element to add.
|
||||||
*/
|
*/
|
||||||
void PushBack(const MY_TYPE * item, int32_t nbElement)
|
void PushBack(const MY_TYPE * item, int32_t nbElement)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user