From d0e0ee39813a81e816f40947fb85710019f73838 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Wed, 27 Apr 2016 17:05:46 +1000 Subject: [PATCH] io_win32: add mapped_file::empty implementation --- io_win32.cpp | 7 +++++++ io_win32.hpp | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) 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);