Compiler fixes for VS2010.

This fixes some errors caused by Windows defining things like min and max, as well as a number of warnings about type conversion, unused parameters, inability to generate assignment operators, and constant conditions.

All type conversions were assumed to be intentional, and static_casts have been added to remove the compiler warnings.

The server code should now build cleanly with level 4 warnings enabled (as used in my project), and the client code should build cleanly with level 3 warnings enabled (as used by the WebSocket++ projects).
This commit is contained in:
Jamie Dale
2012-04-12 19:31:12 +01:00
parent af23ead5fc
commit 42afb69ede
16 changed files with 52 additions and 33 deletions

View File

@@ -316,5 +316,5 @@ uint16_t uri::get_port_from_string(const std::string& port) const {
throw websocketpp::uri_exception("Error parsing port string: "+port);
}
return t_port;
return static_cast<uint16_t>(t_port);
}