diff --git a/include/boost/fiber/bounded_channel.hpp b/include/boost/fiber/bounded_channel.hpp index 106abd40..e11d6d7e 100644 --- a/include/boost/fiber/bounded_channel.hpp +++ b/include/boost/fiber/bounded_channel.hpp @@ -108,7 +108,7 @@ private: } channel_op_status push_( typename node::ptr const& new_node, - std::unique_lock< boost::fibers::mutex >& lk ) { + std::unique_lock< boost::fibers::mutex > & lk ) { if ( is_closed_() ) { return channel_op_status::closed; } @@ -134,8 +134,8 @@ private: template< typename Clock, typename Duration > channel_op_status push_wait_until_( typename node::ptr const& new_node, - std::chrono::time_point< Clock, Duration > const& timeout_time, - std::unique_lock< boost::fibers::mutex >& lk) { + std::chrono::time_point< Clock, Duration > const& timeout_time, + std::unique_lock< boost::fibers::mutex > & lk) { if ( is_closed_() ) { return channel_op_status::closed; } diff --git a/include/boost/fiber/unbounded_channel.hpp b/include/boost/fiber/unbounded_channel.hpp index fb3d6179..13795f0c 100644 --- a/include/boost/fiber/unbounded_channel.hpp +++ b/include/boost/fiber/unbounded_channel.hpp @@ -95,7 +95,7 @@ private: } channel_op_status push_( typename node::ptr const& new_node, - std::unique_lock< boost::fibers::mutex >& lk) { + std::unique_lock< boost::fibers::mutex > & lk) { if ( is_closed_() ) { return channel_op_status::closed; } @@ -135,10 +135,10 @@ private: typename node::ptr pop_head_() { typename node::ptr old_head = head_; head_ = old_head->nxt; - if ( nullptr == head_) { + if ( ! head_) { tail_ = & head_; } - old_head->nxt = nullptr; + old_head->nxt.reset(); return old_head; }