mem_fun -> mem_fn.

mem_fun is deprecated in C++11. Also it does everything mem_fun can do, but more conveniently.
This commit is contained in:
Lioncash 2013-01-23 23:29:50 -05:00
commit b7d32b0a3d
8 changed files with 11 additions and 9 deletions

View file

@ -101,7 +101,7 @@ bool GeckoSockServer::GetAvailableSock(sf::SocketTCP &sock_to_fill)
recv_fifo = std::queue<u8>();
send_fifo = std::queue<u8>();
}
clientThread = std::thread(std::mem_fun(&GeckoSockServer::ClientThread), this);
clientThread = std::thread(std::mem_fn(&GeckoSockServer::ClientThread), this);
client_count++;
waiting_socks.pop();
sock_filled = true;

View file

@ -264,7 +264,7 @@ bool Wiimote::Connect()
// Set LEDs
SetLEDs(WIIMOTE_LED_1 << index);
m_wiimote_thread = std::thread(std::mem_fun(&Wiimote::ThreadFunc), this);
m_wiimote_thread = std::thread(std::mem_fn(&Wiimote::ThreadFunc), this);
// This isn't as drastic as it sounds, since the process in which the threads
// reside is normal priority. Needed for keeping audio reports at a decent rate

View file

@ -70,7 +70,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_fun(&NetPlayClient::ThreadFunc), this);
m_thread = std::thread(std::mem_fn(&NetPlayClient::ThreadFunc), this);
}
}
else

View file

@ -38,7 +38,7 @@ NetPlayServer::NetPlayServer(const u16 port, const std::string& name, NetPlayUI*
is_connected = true;
m_selector.Add(m_socket);
m_thread = std::thread(std::mem_fun(&NetPlayServer::ThreadFunc), this);
m_thread = std::thread(std::mem_fn(&NetPlayServer::ThreadFunc), this);
}
else
is_connected = false;