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
commit 102672a797
3 changed files with 7 additions and 7 deletions

View file

@ -56,7 +56,8 @@ public:
void GetPlayerList(std::string& list, std::vector<int>& pid_list);
std::vector<const Player*> GetPlayers();
bool is_connected;
// Called from the GUI thread.
bool IsConnected() const { return m_is_connected; }
bool StartGame(const std::string &path);
bool StopGame();
@ -135,6 +136,8 @@ private:
void Disconnect();
bool Connect();
bool m_is_connected = false;
PlayerId m_pid;
std::map<PlayerId, Player> m_players;
std::string m_host_spec;