From a3eeee5ace1a1cd09f069df5a1519b9067fe3f68 Mon Sep 17 00:00:00 2001 From: Jeremiah Willcock Date: Wed, 20 May 2009 19:19:00 +0000 Subject: [PATCH] Fixed most tab and min/max issues from trunk inspection report [SVN r53141] --- include/boost/interprocess/detail/move.hpp | 2 +- include/boost/interprocess/detail/workaround.hpp | 2 +- include/boost/interprocess/mapped_region.hpp | 5 +---- test/message_queue_test.cpp | 6 +----- 4 files changed, 4 insertions(+), 11 deletions(-) diff --git a/include/boost/interprocess/detail/move.hpp b/include/boost/interprocess/detail/move.hpp index 9ecd69f..5ec287e 100644 --- a/include/boost/interprocess/detail/move.hpp +++ b/include/boost/interprocess/detail/move.hpp @@ -744,4 +744,4 @@ struct has_trivial_destructor_after_move } //namespace interprocess { } //namespace boost { -#endif //#ifndef BOOST_INTERPROCESS_MOVE_HPP +#endif //#ifndef BOOST_INTERPROCESS_MOVE_HPP diff --git a/include/boost/interprocess/detail/workaround.hpp b/include/boost/interprocess/detail/workaround.hpp index 72664bb..983e01f 100644 --- a/include/boost/interprocess/detail/workaround.hpp +++ b/include/boost/interprocess/detail/workaround.hpp @@ -36,7 +36,7 @@ # define BOOST_INTERPROCESS_POSIX_PROCESS_SHARED # endif #endif - + #if ((_POSIX_BARRIERS - 0) > 0) # define BOOST_INTERPROCESS_POSIX_BARRIERS # endif diff --git a/include/boost/interprocess/mapped_region.hpp b/include/boost/interprocess/mapped_region.hpp index f571272..c316006 100644 --- a/include/boost/interprocess/mapped_region.hpp +++ b/include/boost/interprocess/mapped_region.hpp @@ -247,12 +247,9 @@ inline mapped_region::mapped_region error_info err(winapi::get_last_error()); throw interprocess_exception(err); } - #ifdef max - #undef max - #endif if(static_cast(total_size) > - std::numeric_limits::max()){ + (std::numeric_limits::max)()){ error_info err(size_error); throw interprocess_exception(err); } diff --git a/test/message_queue_test.cpp b/test/message_queue_test.cpp index f6c720e..d68325b 100644 --- a/test/message_queue_test.cpp +++ b/test/message_queue_test.cpp @@ -23,10 +23,6 @@ #include #include "get_process_id_name.hpp" -#ifdef max -#undef max -#endif - //////////////////////////////////////////////////////////////////////////////// // // // This example tests the process shared message queue. // @@ -60,7 +56,7 @@ bool test_priority_order() mq1.send(&tstamp, sizeof(tstamp), (unsigned int)(i%10)); } - unsigned int priority_prev = std::numeric_limits::max(); + unsigned int priority_prev = (std::numeric_limits::max)(); std::size_t tstamp_prev = 0; //Receive all messages and test those are ordered