posix/map: add missing empty method

This commit is contained in:
Danny Robson 2016-10-02 16:39:47 +11:00
parent b949b90dd7
commit 08249f530e
2 changed files with 11 additions and 2 deletions

View File

@ -105,6 +105,14 @@ map::data (void) const
///////////////////////////////////////////////////////////////////////////////
bool
map::empty (void) const
{
return size () == 0;
}
//-----------------------------------------------------------------------------
size_t
map::size (void) const
{

View File

@ -38,8 +38,8 @@ namespace util::posix {
uint8_t* begin (void);
uint8_t* end (void);
const uint8_t* begin (void) const;
const uint8_t* end (void) const;
const uint8_t* begin (void) const;
const uint8_t* end (void) const;
const uint8_t* cbegin (void) const;
const uint8_t* cend (void) const;
@ -48,6 +48,7 @@ namespace util::posix {
void sync (void *addr, size_t len, int flags);
bool empty (void) const;
size_t size (void) const;
enum class resize_t { MOVE, NOMOVE };