[DEV] add empty function
This commit is contained in:
parent
86dd643a6c
commit
3733747856
@ -301,6 +301,14 @@ namespace etk {
|
|||||||
* @return The number requested
|
* @return The number requested
|
||||||
*/
|
*/
|
||||||
size_t size() const;
|
size_t size() const;
|
||||||
|
/**
|
||||||
|
* @brief Check if the container have some element
|
||||||
|
* @return true The container is empty
|
||||||
|
* @return famse The container have some element
|
||||||
|
*/
|
||||||
|
bool empty() const {
|
||||||
|
return size() == 0;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* @brief Get a current element in the string
|
* @brief Get a current element in the string
|
||||||
* @param[in] _pos Desired position read
|
* @param[in] _pos Desired position read
|
||||||
|
@ -300,6 +300,14 @@ namespace etk {
|
|||||||
* @return The number requested
|
* @return The number requested
|
||||||
*/
|
*/
|
||||||
size_t size() const;
|
size_t size() const;
|
||||||
|
/**
|
||||||
|
* @brief Check if the container have some element
|
||||||
|
* @return true The container is empty
|
||||||
|
* @return famse The container have some element
|
||||||
|
*/
|
||||||
|
bool empty() const {
|
||||||
|
return size() == 0;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* @brief Get a current element in the string
|
* @brief Get a current element in the string
|
||||||
* @param[in] _pos Desired position read
|
* @param[in] _pos Desired position read
|
||||||
|
@ -343,7 +343,12 @@ namespace etk {
|
|||||||
size_t size() const {
|
size_t size() const {
|
||||||
return m_size;
|
return m_size;
|
||||||
}
|
}
|
||||||
size_t empty() const {
|
/**
|
||||||
|
* @brief Check if the container have some element
|
||||||
|
* @return true The container is empty
|
||||||
|
* @return famse The container have some element
|
||||||
|
*/
|
||||||
|
bool empty() const {
|
||||||
return m_size == 0;
|
return m_size == 0;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user