From: <tu...@us...> - 2009-09-28 12:32:03
|
Revision: 87 http://polserver.svn.sourceforge.net/polserver/?rev=87&view=rev Author: turley Date: 2009-09-28 12:30:13 +0000 (Mon, 28 Sep 2009) Log Message: ----------- more cast warning fixes Modified Paths: -------------- trunk/pol-core/pol/console.cpp trunk/pol-core/pol/polwww.cpp trunk/pol-core/pol/textcmd.cpp Modified: trunk/pol-core/pol/console.cpp =================================================================== --- trunk/pol-core/pol/console.cpp 2009-09-23 10:05:29 UTC (rev 86) +++ trunk/pol-core/pol/console.cpp 2009-09-28 12:30:13 UTC (rev 87) @@ -56,7 +56,7 @@ } if (charspec[0] == '^' && charspec.size() == 2) { - ch = toupper( charspec[1] ) - 'A' + 1; + ch = static_cast<char>(toupper( charspec[1] )) - 'A' + 1; } else if (charspec.size() == 1) { @@ -236,7 +236,7 @@ #ifdef _WIN32 if (kbhit()) { - exec_console_cmd( getch() ); + exec_console_cmd( static_cast<char>(getch()) ); } #else if (kb.kbhit()) Modified: trunk/pol-core/pol/polwww.cpp =================================================================== --- trunk/pol-core/pol/polwww.cpp 2009-09-23 10:05:29 UTC (rev 86) +++ trunk/pol-core/pol/polwww.cpp 2009-09-28 12:30:13 UTC (rev 87) @@ -234,7 +234,7 @@ if (isdigit( chH )) ch = (chH - '0') << 4; else - ch = ((tolower(chH) - 'a') + 10) << 4; + ch = ((static_cast<char>(tolower(chH)) - 'a') + 10) << 4; if (isdigit(chL)) ch |= (chL - '0'); @@ -610,7 +610,7 @@ { ifs.read(bfr, sizeof(bfr)); cur_read += static_cast<unsigned long>(ifs.gcount()); - sck.send(bfr, ifs.gcount()); // This was sizeof bfr, which would send garbage... fixed -- Nando, 2009-02-22 + sck.send(bfr, static_cast<unsigned int>(ifs.gcount())); // This was sizeof bfr, which would send garbage... fixed -- Nando, 2009-02-22 } // ------------- } Modified: trunk/pol-core/pol/textcmd.cpp =================================================================== --- trunk/pol-core/pol/textcmd.cpp 2009-09-23 10:05:29 UTC (rev 86) +++ trunk/pol-core/pol/textcmd.cpp 2009-09-28 12:30:13 UTC (rev 87) @@ -575,7 +575,7 @@ do { ifs.read( temp, sizeof temp ); if (ifs.gcount()) - result.append( temp, ifs.gcount() ); + result.append( temp, static_cast<size_t>(ifs.gcount()) ); } while (!ifs.eof()); return result; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |