Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #765 from lioncash/memfn
Core: Get rid of calls to mem_fn in thread instantiations
  • Loading branch information
lioncash committed Aug 10, 2014
2 parents e266635 + 6faed31 commit 7e2673c
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 10 deletions.
4 changes: 1 addition & 3 deletions Source/Core/Core/HW/EXI_DeviceGecko.cpp
Expand Up @@ -2,8 +2,6 @@
// Licensed under GPLv2
// Refer to the license.txt file included.

#include <functional>

#include "Core/Core.h"
#include "Core/HW/EXI_Device.h"
#include "Core/HW/EXI_DeviceGecko.h"
Expand Down Expand Up @@ -88,7 +86,7 @@ bool GeckoSockServer::GetAvailableSock(sf::SocketTCP &sock_to_fill)
recv_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++;
waiting_socks.pop();
sock_filled = true;
Expand Down
4 changes: 2 additions & 2 deletions Source/Core/Core/HW/WiimoteReal/WiimoteReal.cpp
Expand Up @@ -418,7 +418,7 @@ void WiimoteScanner::StartScanning()
if (!m_run_thread)
{
m_run_thread = true;
m_scan_thread = std::thread(std::mem_fn(&WiimoteScanner::ThreadFunc), this);
m_scan_thread = std::thread(&WiimoteScanner::ThreadFunc, this);
}
}

Expand Down Expand Up @@ -491,7 +491,7 @@ bool Wiimote::Connect()
void Wiimote::StartThread()
{
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()
Expand Down
1 change: 0 additions & 1 deletion Source/Core/Core/HW/WiimoteReal/WiimoteReal.h
Expand Up @@ -4,7 +4,6 @@

#pragma once

#include <functional>
#include <vector>

#include "Common/ChunkFile.h"
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/NetPlayClient.cpp
Expand Up @@ -117,7 +117,7 @@ NetPlayClient::NetPlayClient(const std::string& address, const u16 port, NetPlay
is_connected = true;

m_selector.Add(m_socket);
m_thread = std::thread(std::mem_fn(&NetPlayClient::ThreadFunc), this);
m_thread = std::thread(&NetPlayClient::ThreadFunc, this);
}
}
else
Expand Down
1 change: 0 additions & 1 deletion Source/Core/Core/NetPlayClient.h
Expand Up @@ -4,7 +4,6 @@

#pragma once

#include <functional>
#include <map>
#include <queue>
#include <sstream>
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/NetPlayServer.cpp
Expand Up @@ -35,7 +35,7 @@ NetPlayServer::NetPlayServer(const u16 port) : is_connected(false), m_is_running
is_connected = true;
m_do_loop = true;
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;
}
}
Expand Down
1 change: 0 additions & 1 deletion Source/Core/Core/NetPlayServer.h
Expand Up @@ -4,7 +4,6 @@

#pragma once

#include <functional>
#include <map>
#include <queue>
#include <sstream>
Expand Down

0 comments on commit 7e2673c

Please sign in to comment.