Merge pull request #765 from lioncash/memfn
Core: Get rid of calls to mem_fn in thread instantiations
This commit is contained in:
commit
7e2673c215
|
@ -2,8 +2,6 @@
|
||||||
// Licensed under GPLv2
|
// Licensed under GPLv2
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
#include <functional>
|
|
||||||
|
|
||||||
#include "Core/Core.h"
|
#include "Core/Core.h"
|
||||||
#include "Core/HW/EXI_Device.h"
|
#include "Core/HW/EXI_Device.h"
|
||||||
#include "Core/HW/EXI_DeviceGecko.h"
|
#include "Core/HW/EXI_DeviceGecko.h"
|
||||||
|
@ -88,7 +86,7 @@ bool GeckoSockServer::GetAvailableSock(sf::SocketTCP &sock_to_fill)
|
||||||
recv_fifo = std::deque<u8>();
|
recv_fifo = std::deque<u8>();
|
||||||
send_fifo = std::deque<u8>();
|
send_fifo = std::deque<u8>();
|
||||||
}
|
}
|
||||||
clientThread = std::thread(std::mem_fn(&GeckoSockServer::ClientThread), this);
|
clientThread = std::thread(&GeckoSockServer::ClientThread, this);
|
||||||
client_count++;
|
client_count++;
|
||||||
waiting_socks.pop();
|
waiting_socks.pop();
|
||||||
sock_filled = true;
|
sock_filled = true;
|
||||||
|
|
|
@ -418,7 +418,7 @@ void WiimoteScanner::StartScanning()
|
||||||
if (!m_run_thread)
|
if (!m_run_thread)
|
||||||
{
|
{
|
||||||
m_run_thread = true;
|
m_run_thread = true;
|
||||||
m_scan_thread = std::thread(std::mem_fn(&WiimoteScanner::ThreadFunc), this);
|
m_scan_thread = std::thread(&WiimoteScanner::ThreadFunc, this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -491,7 +491,7 @@ bool Wiimote::Connect()
|
||||||
void Wiimote::StartThread()
|
void Wiimote::StartThread()
|
||||||
{
|
{
|
||||||
m_run_thread = true;
|
m_run_thread = true;
|
||||||
m_wiimote_thread = std::thread(std::mem_fn(&Wiimote::ThreadFunc), this);
|
m_wiimote_thread = std::thread(&Wiimote::ThreadFunc, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Wiimote::StopThread()
|
void Wiimote::StopThread()
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <functional>
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "Common/ChunkFile.h"
|
#include "Common/ChunkFile.h"
|
||||||
|
|
|
@ -117,7 +117,7 @@ NetPlayClient::NetPlayClient(const std::string& address, const u16 port, NetPlay
|
||||||
is_connected = true;
|
is_connected = true;
|
||||||
|
|
||||||
m_selector.Add(m_socket);
|
m_selector.Add(m_socket);
|
||||||
m_thread = std::thread(std::mem_fn(&NetPlayClient::ThreadFunc), this);
|
m_thread = std::thread(&NetPlayClient::ThreadFunc, this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <functional>
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <queue>
|
#include <queue>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
|
@ -35,7 +35,7 @@ NetPlayServer::NetPlayServer(const u16 port) : is_connected(false), m_is_running
|
||||||
is_connected = true;
|
is_connected = true;
|
||||||
m_do_loop = true;
|
m_do_loop = true;
|
||||||
m_selector.Add(m_socket);
|
m_selector.Add(m_socket);
|
||||||
m_thread = std::thread(std::mem_fn(&NetPlayServer::ThreadFunc), this);
|
m_thread = std::thread(&NetPlayServer::ThreadFunc, this);
|
||||||
m_target_buffer_size = 20;
|
m_target_buffer_size = 20;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <functional>
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <queue>
|
#include <queue>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
Loading…
Reference in New Issue