mail[Wesnoth-commits] r20617 - /trunk/src/clipboard.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:28:
Author: mordante
Date: Thu Sep 20 17:28:00 2007
New Revision: 20617

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

Modified:
    trunk/src/clipboard.cpp

Modified: trunk/src/clipboard.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/clipboard.cpp?rev=20617&r1=20616&r2=20617&view=diff
==============================================================================
--- trunk/src/clipboard.cpp (original)
+++ trunk/src/clipboard.cpp Thu Sep 20 17:28:00 2007
@@ -52,7 +52,7 @@
                        "TARGETS"
                };
 
-               XInternAtoms(dpy(), (char**)atoms, 6, false, atomTable_);
+               XInternAtoms(dpy(), const_cast<char**>(reinterpret_cast<const 
char**>(atoms)), 6, false, atomTable_);
 
                release();
        }
@@ -215,7 +215,7 @@
 
                                XChangeProperty(x11->dpy(), 
responseEvent.xselection.requestor,
                                        xev.xselectionrequest.property, 
XA_ATOM, 32, PropModeReplace,
-                                       (unsigned char*)supported, 4);
+                                       const_cast<unsigned 
char*>(reinterpret_cast<const unsigned char*>(supported)), 4);
                        }
 
                        // The encoding of XA_TEXT and XA_COMPOUND_TEXT is 
not specified
@@ -229,7 +229,7 @@
                                XChangeProperty(x11->dpy(), 
responseEvent.xselection.requestor,
                                        xev.xselectionrequest.property,
                                        xev.xselectionrequest.target, 8, 
PropModeReplace,
-                                       (const unsigned char*) 
clipboard_string.c_str(), clipboard_string.length());
+                                       reinterpret_cast<const unsigned 
char*>(clipboard_string.c_str()), clipboard_string.length());
                        }
 
                        XSendEvent(x11->dpy(), 
xev.xselectionrequest.requestor, False, NoEventMask,
@@ -304,7 +304,7 @@
                                                           &typeRet, 
&formatRet, &length, &remaining, &data);
 
                                        if (data && length) {
-                                               ret = (char*)data;
+                                               ret = 
reinterpret_cast<char*>(data);
                                                XFree(data);
                                                return true;
                                        } else {




Related Messages


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