Use BOOST_ASSERT rather than assert.

This commit is contained in:
Christopher Kohlhoff 2011-02-08 18:56:51 +11:00
parent 9690ae5014
commit 548ce5c9a4
2 changed files with 5 additions and 5 deletions

View File

@ -16,7 +16,7 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
#include <cassert>
#include <boost/assert.hpp>
#include <cstddef>
#include <cstring>
#include <vector>
@ -77,7 +77,7 @@ public:
// Resize the buffer to the specified length.
void resize(size_type length)
{
assert(length <= capacity());
BOOST_ASSERT(length <= capacity());
if (begin_offset_ + length <= capacity())
{
end_offset_ = begin_offset_ + length;
@ -100,7 +100,7 @@ public:
// Consume multiple bytes from the beginning of the buffer.
void consume(size_type count)
{
assert(begin_offset_ + count <= end_offset_);
BOOST_ASSERT(begin_offset_ + count <= end_offset_);
begin_offset_ += count;
if (empty())
clear();

View File

@ -16,7 +16,7 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
#include <cassert>
#include <boost/assert.hpp>
#include <list>
#include <utility>
#include "asio/detail/noncopyable.hpp"
@ -179,7 +179,7 @@ public:
// Erase an entry from the map.
void erase(iterator it)
{
assert(it != values_.end());
BOOST_ASSERT(it != values_.end());
size_t bucket = calculate_hash_value(it->first) % num_buckets_;
bool is_first = (it == buckets_[bucket].first);