io: default mapped_file to read only

This is vastly safer compared to write by default. No more unexpectedly
changing files.
This commit is contained in:
Danny Robson 2014-09-29 16:19:16 +10:00
parent 84ca008305
commit abfe4daac3

2
io.hpp
View File

@ -127,7 +127,7 @@ namespace util {
int access_to_flags (access_t);
public:
mapped_file (const boost::filesystem::path &path, access_t access = ACCESS_READWRITE);
mapped_file (const boost::filesystem::path &path, access_t access = ACCESS_READ);
mapped_file (const mapped_file&) = delete;
mapped_file& operator= (const mapped_file&) = delete;