NetPlayClient: Make is_connected private

This is only queried, there's no need to expose it for writing.
Even if it was written to, a data member shouldn't be part of
your public API unless its part of a dumb object or trivial struct.
This commit is contained in:
Lioncash
2016-01-24 21:52:02 -05:00
parent d9f87b8030
commit 102672a797
3 changed files with 7 additions and 7 deletions

View File

@ -30,7 +30,7 @@ NetPlayClient::~NetPlayClient()
if (m_is_running.load())
StopGame();
if (is_connected)
if (m_is_connected)
{
m_do_loop.store(false);
m_thread.join();
@ -76,8 +76,6 @@ NetPlayClient::NetPlayClient(const std::string& address, const u16 port, NetPlay
m_target_buffer_size = 20;
ClearBuffers();
is_connected = false;
m_player_name = name;
if (!traversal)
@ -235,7 +233,7 @@ bool NetPlayClient::Connect()
m_dialog->Update();
is_connected = true;
m_is_connected = true;
return true;
}
@ -629,7 +627,6 @@ std::vector<const Player*> NetPlayClient::GetPlayers()
return players;
}
// called from ---GUI--- thread
void NetPlayClient::SendChatMessage(const std::string& msg)
{