diff --git a/io_win32.cpp b/io_win32.cpp index fdd86f2d..97cf563e 100644 --- a/io_win32.cpp +++ b/io_win32.cpp @@ -155,6 +155,13 @@ mapped_file::size (void) const } +bool +mapped_file::empty (void) const +{ + return size () == 0; +} + + uint8_t* mapped_file::begin (void) { diff --git a/io_win32.hpp b/io_win32.hpp index 8435cfca..08fc63d8 100644 --- a/io_win32.hpp +++ b/io_win32.hpp @@ -46,7 +46,9 @@ namespace util { const uint8_t* data (void) const; uint8_t* data (void); - size_t size (void) const; + + size_t size (void) const; + bool empty (void) const; uint8_t* begin (void); uint8_t* end (void);