io_posix: add mapped_file::empty implementation
This commit is contained in:
parent
d0e0ee3981
commit
de6ea736a1
14
io_posix.cpp
14
io_posix.cpp
@ -63,14 +63,20 @@ mapped_file::load_fd (int mflags) {
|
|||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
size_t
|
size_t
|
||||||
mapped_file::size (void) const {
|
mapped_file::size (void) const
|
||||||
CHECK (m_size > 0);
|
{
|
||||||
CHECK (m_data != NULL);
|
|
||||||
|
|
||||||
return m_size;
|
return m_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
bool
|
||||||
|
mapped_file::empty (void) const
|
||||||
|
{
|
||||||
|
return size () == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
uint8_t*
|
uint8_t*
|
||||||
mapped_file::data (void) {
|
mapped_file::data (void) {
|
||||||
|
@ -42,7 +42,9 @@ namespace util {
|
|||||||
|
|
||||||
const uint8_t* data (void) const;
|
const uint8_t* data (void) const;
|
||||||
uint8_t* data (void);
|
uint8_t* data (void);
|
||||||
size_t size (void) const;
|
|
||||||
|
bool empty (void) const;
|
||||||
|
size_t size (void) const;
|
||||||
|
|
||||||
uint8_t* begin (void);
|
uint8_t* begin (void);
|
||||||
uint8_t* end (void);
|
uint8_t* end (void);
|
||||||
|
Loading…
Reference in New Issue
Block a user