mail[Wesnoth-commits] r20127 - /trunk/src/upload_log.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by koraq on September 05, 2007 - 18:59:
Author: mordante
Date: Wed Sep  5 18:59:03 2007
New Revision: 20127

URL: http://svn.gna.org/viewcvs/wesnoth?rev=20127&view=rev
Log:
C-style cast cleanup. 

Modified:
    trunk/src/upload_log.cpp

Modified: trunk/src/upload_log.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/upload_log.cpp?rev=20127&r1=20126&r2=20127&view=diff
==============================================================================
--- trunk/src/upload_log.cpp (original)
+++ trunk/src/upload_log.cpp Wed Sep  5 18:59:03 2007
@@ -50,8 +50,9 @@
 
 static void send_string(TCPsocket sock, const std::string &str)
 {
-       if (SDLNet_TCP_Send(sock, (void *)str.c_str(), str.length())
-               != (int)str.length()) {
+       if (SDLNet_TCP_Send(sock, const_cast<void*>(static_cast<const void*>(
+                       str.c_str())), str.length()) != 
static_cast<int>(str.length())) {
+
                throw network::error("");
        }
 }
@@ -62,7 +63,7 @@
 static int upload_logs(void *_ti)
 {
        TCPsocket sock = NULL;
-       upload_log::thread_info *ti = (upload_log::thread_info *)_ti;
+       upload_log::thread_info *ti = 
static_cast<upload_log::thread_info*>(_ti);
 
        const char *header =
                "POST " TARGET_URL " HTTP/1.1\n"




Related Messages


Powered by MHonArc, Updated Wed Sep 05 19:20:19 2007