mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
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:
@@ -93,7 +93,7 @@ std::string base64_decode(std::string const& encoded_string) {
|
||||
char_array_4[i++] = encoded_string[in_]; in_++;
|
||||
if (i ==4) {
|
||||
for (i = 0; i <4; i++)
|
||||
char_array_4[i] = base64_chars.find(char_array_4[i]);
|
||||
char_array_4[i] = static_cast<unsigned char>(base64_chars.find(char_array_4[i]));
|
||||
|
||||
char_array_3[0] = (char_array_4[0] << 2) + ((char_array_4[1] & 0x30) >> 4);
|
||||
char_array_3[1] = ((char_array_4[1] & 0xf) << 4) + ((char_array_4[2] & 0x3c) >> 2);
|
||||
@@ -110,7 +110,7 @@ std::string base64_decode(std::string const& encoded_string) {
|
||||
char_array_4[j] = 0;
|
||||
|
||||
for (j = 0; j <4; j++)
|
||||
char_array_4[j] = base64_chars.find(char_array_4[j]);
|
||||
char_array_4[j] = static_cast<unsigned char>(base64_chars.find(char_array_4[j]));
|
||||
|
||||
char_array_3[0] = (char_array_4[0] << 2) + ((char_array_4[1] & 0x30) >> 4);
|
||||
char_array_3[1] = ((char_array_4[1] & 0xf) << 4) + ((char_array_4[2] & 0x3c) >> 2);
|
||||
|
||||
Reference in New Issue
Block a user