diff --git a/include/boost/interprocess/detail/os_file_functions.hpp b/include/boost/interprocess/detail/os_file_functions.hpp index 0eeb26e..7a05b5e 100644 --- a/include/boost/interprocess/detail/os_file_functions.hpp +++ b/include/boost/interprocess/detail/os_file_functions.hpp @@ -24,9 +24,9 @@ #include #include -#include -#include #include +#include +#include #include //make_unsigned #if defined (BOOST_INTERPROCESS_WINDOWS) @@ -37,9 +37,9 @@ # include # include # include -# include -# include # include +# include +# include # if 0 # include # endif @@ -457,7 +457,7 @@ inline file_handle_t create_or_open_file int ret = -1; //We need a loop to change permissions correctly using fchmod, since //with "O_CREAT only" ::open we don't know if we've created or opened the file. - while(1){ + while(true){ ret = ::open(name, ((int)mode) | O_EXCL | O_CREAT, perm.get_permissions()); if(ret >= 0){ ::fchmod(ret, perm.get_permissions()); diff --git a/include/boost/interprocess/errors.hpp b/include/boost/interprocess/errors.hpp index f019852..7fc71d6 100644 --- a/include/boost/interprocess/errors.hpp +++ b/include/boost/interprocess/errors.hpp @@ -34,14 +34,13 @@ #include #include -#include #include #if defined (BOOST_INTERPROCESS_WINDOWS) # include #else # ifdef BOOST_HAS_UNISTD_H -# include //Errors +# include //Errors # include //strerror # else //ifdef BOOST_HAS_UNISTD_H # error Unknown platform diff --git a/include/boost/interprocess/exceptions.hpp b/include/boost/interprocess/exceptions.hpp index 336a5fc..1db7f52 100644 --- a/include/boost/interprocess/exceptions.hpp +++ b/include/boost/interprocess/exceptions.hpp @@ -60,9 +60,9 @@ class BOOST_SYMBOL_VISIBLE interprocess_exception : public std::exception catch(...){} } - virtual ~interprocess_exception() BOOST_NOEXCEPT_OR_NOTHROW {} + ~interprocess_exception() BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE {} - virtual const char * what() const BOOST_NOEXCEPT_OR_NOTHROW + const char * what() const BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE { return m_str.c_str(); } native_error_t get_native_error()const { return m_err.get_native_error(); } @@ -86,7 +86,7 @@ class BOOST_SYMBOL_VISIBLE lock_exception : public interprocess_exception : interprocess_exception(lock_error) {} - virtual const char* what() const BOOST_NOEXCEPT_OR_NOTHROW + const char* what() const BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE { return "boost::interprocess::lock_exception"; } }; @@ -96,9 +96,10 @@ class BOOST_SYMBOL_VISIBLE lock_exception : public interprocess_exception class BOOST_SYMBOL_VISIBLE bad_alloc : public interprocess_exception { public: - bad_alloc() : interprocess_exception("::boost::interprocess::bad_alloc"){} - virtual const char* what() const BOOST_NOEXCEPT_OR_NOTHROW - { return "boost::interprocess::bad_alloc"; } + bad_alloc() : interprocess_exception("::boost::interprocess::bad_alloc") {} + + const char* what() const BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE + { return "boost::interprocess::bad_alloc"; } }; } // namespace interprocess { diff --git a/include/boost/interprocess/shared_memory_object.hpp b/include/boost/interprocess/shared_memory_object.hpp index 34a695d..271a571 100644 --- a/include/boost/interprocess/shared_memory_object.hpp +++ b/include/boost/interprocess/shared_memory_object.hpp @@ -328,7 +328,7 @@ inline bool shared_memory_object::priv_open_or_create { //We need a create/open loop to change permissions correctly using fchmod, since //with "O_CREAT" only we don't know if we've created or opened the shm. - while(1){ + while(true){ //Try to create shared memory m_handle = shm_open(m_filename.c_str(), oflag | (O_CREAT | O_EXCL), unix_perm); //If successful change real permissions