修复windows下编译不过的bug

This commit is contained in:
夏楚 2017-10-09 11:24:00 +08:00 committed by GitHub
parent 4a6b5bc46a
commit fecfbbe101

View File

@ -25,9 +25,11 @@
*/ */
#include <list> #include <list>
#include <type_traits>
#include "RtpBroadCaster.h" #include "RtpBroadCaster.h"
#include "Util/util.h" #include "Util/util.h"
#include "Network/sockutil.h" #include "Network/sockutil.h"
using namespace std;
namespace ZL { namespace ZL {
namespace Rtsp { namespace Rtsp {
@ -116,7 +118,7 @@ RtpBroadCaster::RtpBroadCaster(const string &strLocalIp,const string &strApp,con
unordered_map<void * , onDetach > m_mapDetach_copy; unordered_map<void * , onDetach > m_mapDetach_copy;
{ {
lock_guard<recursive_mutex> lck(m_mtx); lock_guard<recursive_mutex> lck(m_mtx);
m_mapDetach_copy.swap(m_mapDetach); m_mapDetach_copy = std::move(m_mapDetach);
} }
for(auto &pr : m_mapDetach_copy){ for(auto &pr : m_mapDetach_copy){
pr.second(); pr.second();