diff options
| author | lioncash <mathew1800@gmail.com> | 2014-02-10 09:26:29 -0500 |
|---|---|---|
| committer | lioncash <mathew1800@gmail.com> | 2014-02-10 09:26:29 -0500 |
| commit | f5408c3f52a53368f790decbae2d780d6c8f09c1 (patch) | |
| tree | 227a06ca418b7d2ff0f2f4e6469cd51e1e6b42c2 /Source/Core | |
| parent | 079b1ba93deb8f3585f9211cfd1f73ccf16ae2a7 (diff) | |
Clarify an if statement in NetPlayClient.cpp. See: https://github.com/LaurentGomila/SFML/issues/26.
This was simply an error in documentation. It actually returns an sf::Socket::Status enum value as a result.
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/NetPlayClient.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/Core/Core/NetPlayClient.cpp b/Source/Core/Core/NetPlayClient.cpp index f473cbd22a..02b71e495b 100644 --- a/Source/Core/Core/NetPlayClient.cpp +++ b/Source/Core/Core/NetPlayClient.cpp @@ -67,8 +67,7 @@ NetPlayClient::NetPlayClient(const std::string& address, const u16 port, NetPlay is_connected = false; - // why is false successful? documentation says true is - if (0 == m_socket.Connect(port, address, 5)) + if (m_socket.Connect(port, address, 5) == sf::Socket::Done) { // send connect message sf::Packet spac; @@ -126,8 +125,9 @@ NetPlayClient::NetPlayClient(const std::string& address, const u16 port, NetPlay } } else + { PanicAlertT("Failed to Connect!"); - + } } // called from ---NETPLAY--- thread |
