Skip to content

Commit 76facbb

Browse files
artifactzjihoonl
authored andcommitted
fixed misuse of remove_if (#35)
1 parent c89f9f4 commit 76facbb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/web_video_server.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ void WebVideoServer::cleanup_inactive_streams()
9797
if (lock)
9898
{
9999
typedef std::vector<boost::shared_ptr<ImageStreamer> >::iterator itr_type;
100-
itr_type new_end = std::remove_if(image_subscribers_.begin(), image_subscribers_.end(),
101-
boost::bind(&ImageStreamer::isInactive, _1));
100+
itr_type new_end = std::partition(image_subscribers_.begin(), image_subscribers_.end(),
101+
!boost::bind(&ImageStreamer::isInactive, _1));
102102
if (__verbose)
103103
{
104104
for (itr_type itr = new_end; itr < image_subscribers_.end(); ++itr)

0 commit comments

Comments
 (0)