From da3b709ecab36b42496573be2a4a32bee35769cb Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Wed, 7 Jan 2015 16:00:12 +1100 Subject: [PATCH] style --- io_posix.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/io_posix.cpp b/io_posix.cpp index b8a6e0f8..9d654098 100644 --- a/io_posix.cpp +++ b/io_posix.cpp @@ -35,12 +35,14 @@ mapped_file::mapped_file (const boost::filesystem::path &_path, access_t _access { load_fd (_access); } +//---------------------------------------------------------------------------- mapped_file::~mapped_file () { CHECK (m_data != NULL); munmap (m_data, m_size); } +//---------------------------------------------------------------------------- int mapped_file::access_to_flags (access_t a) { int flags = 0; @@ -55,6 +57,7 @@ mapped_file::access_to_flags (access_t a) { } +//---------------------------------------------------------------------------- void mapped_file::load_fd (access_t access) { struct stat meta; @@ -68,6 +71,7 @@ mapped_file::load_fd (access_t access) { } +//---------------------------------------------------------------------------- size_t mapped_file::size (void) const { CHECK (m_size > 0); @@ -77,6 +81,7 @@ mapped_file::size (void) const { } +//---------------------------------------------------------------------------- uint8_t* mapped_file::data (void) { CHECK (m_size > 0); @@ -86,6 +91,7 @@ mapped_file::data (void) { } +//---------------------------------------------------------------------------- const uint8_t* mapped_file::data (void) const { CHECK (m_size > 0); @@ -95,24 +101,28 @@ mapped_file::data (void) const { } +//---------------------------------------------------------------------------- uint8_t* mapped_file::begin (void) { return data (); } +//---------------------------------------------------------------------------- uint8_t* mapped_file::end (void) { return data () + size (); } +//---------------------------------------------------------------------------- const uint8_t* mapped_file::cbegin (void) const { return data (); } +//---------------------------------------------------------------------------- const uint8_t* mapped_file::cend (void) const { return data () + size ();