diff options
Diffstat (limited to 'boost/interprocess/detail/file_wrapper.hpp')
-rw-r--r-- | boost/interprocess/detail/file_wrapper.hpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/boost/interprocess/detail/file_wrapper.hpp b/boost/interprocess/detail/file_wrapper.hpp index 7b53f36ac8..586e20db4d 100644 --- a/boost/interprocess/detail/file_wrapper.hpp +++ b/boost/interprocess/detail/file_wrapper.hpp @@ -44,13 +44,13 @@ class file_wrapper file_wrapper(open_or_create_t, const char *name, mode_t mode, const permissions &perm = permissions()) { this->priv_open_or_create(ipcdetail::DoOpenOrCreate, name, mode, perm); } - //!Tries to open a file with name "name", with the access mode "mode". + //!Tries to open a file with name "name", with the access mode "mode". //!If the file does not previously exist, it throws an error. file_wrapper(open_only_t, const char *name, mode_t mode) { this->priv_open_or_create(ipcdetail::DoOpen, name, mode, permissions()); } - //!Moves the ownership of "moved"'s file to *this. - //!After the call, "moved" does not represent any file. + //!Moves the ownership of "moved"'s file to *this. + //!After the call, "moved" does not represent any file. //!Does not throw file_wrapper(BOOST_RV_REF(file_wrapper) moved) : m_handle(file_handle_t(ipcdetail::invalid_file())) @@ -60,10 +60,10 @@ class file_wrapper //!After the call, "moved" does not represent any file. //!Does not throw file_wrapper &operator=(BOOST_RV_REF(file_wrapper) moved) - { + { file_wrapper tmp(boost::move(moved)); this->swap(tmp); - return *this; + return *this; } //!Swaps to file_wrappers. @@ -73,7 +73,7 @@ class file_wrapper //!Erases a file from the system. //!Returns false on error. Never throws static bool remove(const char *name); - + //!Sets the size of the file void truncate(offset_t length); @@ -108,11 +108,11 @@ class file_wrapper std::string m_filename; }; -inline file_wrapper::file_wrapper() +inline file_wrapper::file_wrapper() : m_handle(file_handle_t(ipcdetail::invalid_file())) {} -inline file_wrapper::~file_wrapper() +inline file_wrapper::~file_wrapper() { this->priv_close(); } inline const char *file_wrapper::get_name() const @@ -122,10 +122,10 @@ inline bool file_wrapper::get_size(offset_t &size) const { return get_file_size((file_handle_t)m_handle, size); } inline void file_wrapper::swap(file_wrapper &other) -{ +{ std::swap(m_handle, other.m_handle); std::swap(m_mode, other.m_mode); - m_filename.swap(other.m_filename); + m_filename.swap(other.m_filename); } inline mapping_handle_t file_wrapper::get_mapping_handle() const @@ -135,7 +135,7 @@ inline mode_t file_wrapper::get_mode() const { return m_mode; } inline bool file_wrapper::priv_open_or_create - (ipcdetail::create_enum_t type, + (ipcdetail::create_enum_t type, const char *filename, mode_t mode, const permissions &perm = permissions()) |