mail[Wesnoth-commits] r20618 - /trunk/src/network.cpp


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

Header


Content

Posted by koraq on September 20, 2007 - 17:29:
Author: mordante
Date: Thu Sep 20 17:28:53 2007
New Revision: 20618

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

Modified:
    trunk/src/network.cpp

Modified: trunk/src/network.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/network.cpp?rev=20618&r1=20617&r2=20618&view=diff
==============================================================================
--- trunk/src/network.cpp (original)
+++ trunk/src/network.cpp Thu Sep 20 17:28:53 2007
@@ -322,7 +322,7 @@
        }
 #elif !defined(__BEOS__)
        int flags;
-       flags = fcntl(((_TCPsocket*)sock)->channel, F_GETFL, 0);
+       flags = fcntl((reinterpret_cast<_TCPsocket*>(sock))->channel, 
F_GETFL, 0);
 #if defined(O_NONBLOCK)
        flags |= O_NONBLOCK;
 #elif defined(O_NDELAY)
@@ -330,7 +330,7 @@
 #elif defined(FNDELAY)
        flags |= FNDELAY;
 #endif
-       if(fcntl(((_TCPsocket*)sock)->channel, F_SETFL, flags) == -1) {
+       if(fcntl((reinterpret_cast<_TCPsocket*>(sock))->channel, F_SETFL, 
flags) == -1) {
                error_ = ("Could not make socket non-blocking: " + 
std::string(strerror(errno))).c_str();
                return;
        }
@@ -540,7 +540,7 @@
                remove_connection(s);
        } else {
                if(sockets.size() == 1) {
-                       LOG_NW << "valid socket: " << (int)*sockets.begin() 
<< "\n";
+                       LOG_NW << "valid socket: " << 
static_cast<int>(*sockets.begin()) << "\n";
                }
        }
 




Related Messages


Powered by MHonArc, Updated Thu Sep 20 17:40:54 2007