diff options
| author | Ross Smith II <aria2spam@smithii.com> | 2009-06-02 03:18:07 +0000 |
|---|---|---|
| committer | Ross Smith II <aria2spam@smithii.com> | 2009-06-02 03:18:07 +0000 |
| commit | 2e34ea1e4285a3197b18b4e6b2b00b3b3888ab6c (patch) | |
| tree | 47a339f1f37751872fb6cfc2a9ec05f3d7bfc3d9 /src/SocketCore.h | |
| parent | 3455fca9cacfeba18cbf42cf45d66d4c863c6da2 (diff) | |
Added (sock_t) to quiet compiler warnings in MinGW
Diffstat (limited to 'src/SocketCore.h')
| -rw-r--r-- | src/SocketCore.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/SocketCore.h b/src/SocketCore.h index aa46dc71..4cdaa473 100644 --- a/src/SocketCore.h +++ b/src/SocketCore.h @@ -141,7 +141,7 @@ public: sock_t getSockfd() const { return sockfd; } - bool isOpen() const { return sockfd != -1; } + bool isOpen() const { return sockfd != (sock_t) -1; } /** * Creates a socket and bind it with locahost's address and port. @@ -161,7 +161,7 @@ public: * @param addrinfo placeholder to store host address and port. */ void getAddrInfo(std::pair<std::string, uint16_t>& addrinfo) const; - + /** * Stores peer's address and port to peerinfo. * @param peerinfo placeholder to store peer's address and port. @@ -280,7 +280,7 @@ public: { return readDataFrom(reinterpret_cast<char*>(data), len, sender); } - + /** * Reads up to len bytes from this socket, but bytes are not removed from * this socket. @@ -291,7 +291,7 @@ public: * the number of bytes read to len. */ void peekData(char* data, size_t& len); - + void peekData(unsigned char* data, size_t& len) { peekData(reinterpret_cast<char*>(data), len); @@ -311,11 +311,11 @@ public: bool operator==(const SocketCore& s) { return sockfd == s.sockfd; } - + bool operator!=(const SocketCore& s) { return !(*this == s); } - + bool operator<(const SocketCore& s) { return sockfd < s.sockfd; } |
