diff options
Diffstat (limited to 'boost/interprocess/sync/windows/semaphore.hpp')
-rw-r--r-- | boost/interprocess/sync/windows/semaphore.hpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/boost/interprocess/sync/windows/semaphore.hpp b/boost/interprocess/sync/windows/semaphore.hpp index af336df48a..7fdbc41b3d 100644 --- a/boost/interprocess/sync/windows/semaphore.hpp +++ b/boost/interprocess/sync/windows/semaphore.hpp @@ -1,6 +1,6 @@ ////////////////////////////////////////////////////////////////////////////// // -// (C) Copyright Ion Gaztanaga 2005-2011. Distributed under the Boost +// (C) Copyright Ion Gaztanaga 2005-2012. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // @@ -11,7 +11,7 @@ #ifndef BOOST_INTERPROCESS_DETAIL_WINDOWS_SEMAPHORE_HPP #define BOOST_INTERPROCESS_DETAIL_WINDOWS_SEMAPHORE_HPP -#if (defined _MSC_VER) && (_MSC_VER >= 1200) +#if defined(_MSC_VER) # pragma once #endif @@ -23,6 +23,7 @@ #include <boost/interprocess/sync/windows/sync_utils.hpp> #include <boost/interprocess/sync/windows/winapi_semaphore_wrapper.hpp> #include <boost/interprocess/exceptions.hpp> +#include <boost/assert.hpp> namespace boost { @@ -56,8 +57,8 @@ inline windows_semaphore::windows_semaphore(unsigned int initialCount) bool open_or_created; handles.obtain_semaphore(this->id_, initialCount, &open_or_created); //The semaphore must be created, never opened - assert(open_or_created); - assert(open_or_created && winapi::get_last_error() != winapi::error_already_exists); + BOOST_ASSERT(open_or_created); + BOOST_ASSERT(open_or_created && winapi::get_last_error() != winapi::error_already_exists); (void)open_or_created; } |