$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-06-09 12:59:48
AMDG
Ovanes Markarian wrote:
>
>
> // assignment operator
> CircularBuffer& operator= (const CircularBuffer& other)
> {
> CircularBuffer temp(other);
>
> why do you need this temp, if it is not used further?
>
>
> WriteLock w_lock(rw_mutex);
>
> using std::swap;
> swap(m_capacity, other.m_capacity);
> swap(m_buffer, other.m_buffer);
>
Whoops.
swap(m_capacity, temp.m_capacity);
swap(m_buffer, temp.m_buffer);
In Christ,
Steven Watanabe