[DEV] add empty function

This commit is contained in:
Edouard DUPIN 2017-10-02 23:28:27 +02:00
parent 86dd643a6c
commit 3733747856
3 changed files with 22 additions and 1 deletions

View File

@ -301,6 +301,14 @@ namespace etk {
* @return The number requested
*/
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
* @param[in] _pos Desired position read

View File

@ -300,6 +300,14 @@ namespace etk {
* @return The number requested
*/
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
* @param[in] _pos Desired position read

View File

@ -343,7 +343,12 @@ namespace etk {
size_t size() const {
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;
}
/**