提交 9bd10de6 编写于 作者: Y youngwolf

Replace container insertion push_back with emplace_back.

上级 76476484
......@@ -156,7 +156,7 @@ protected:
if (old_object_ptr && !init_object_id(object_ptr, id))
{
boost::lock_guard<boost::mutex> lock(invalid_object_can_mutex);
invalid_object_can.push_back(old_object_ptr);
invalid_object_can.emplace_back(old_object_ptr);
old_object_ptr.reset();
}
......
......@@ -144,7 +144,7 @@ public:
{
boost::lock_guard<boost::mutex> lock(context_can_mutex);
for (BOOST_AUTO(iter, context_can.begin()); iter != context_can.end(); ++iter)
refs.push_back(iter->refs);
refs.emplace_back(iter->refs);
}
}
......
......@@ -106,7 +106,7 @@ public:
if (!socket_ptr)
break;
sockets.push_back(socket_ptr);
sockets.emplace_back(socket_ptr);
}
if (num >= 0)
unified_out::info_out("finished pre-creating server sockets, but failed %d time(s).", num + 1);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册