]> source.dussan.org Git - tigervnc.git/commitdiff
Avoid dropping const qualifier needlessly
authorPierre Ossman <ossman@cendio.se>
Tue, 29 Sep 2015 13:43:28 +0000 (15:43 +0200)
committerPierre Ossman <ossman@cendio.se>
Tue, 29 Sep 2015 13:43:28 +0000 (15:43 +0200)
common/rdr/MemInStream.h
unix/xserver/hw/vnc/vncExtInit.cc

index 77ca3f3a58121e099ad5fa799ec6140853ad0993..1a6a7982e9d36dc1d307356ae917735d77eb329a 100644 (file)
@@ -45,7 +45,7 @@ namespace rdr {
 
     virtual ~MemInStream() {
       if (deleteWhenDone)
-        delete [] (U8*)start;
+        delete [] start;
     }
 
     int pos() { return ptr - start; }
index 0ae55b6fcc6769cfdf5b4c0f16baf56941e78745..2d918b040b4155815049d79a2450154ac34aa28a 100644 (file)
@@ -329,8 +329,8 @@ void vncAddChanged(int scrIdx, const struct UpdateRect *extents,
 {
   Region reg;
 
-  reg.setExtentsAndOrderedRects((ShortRect*)extents,
-                                nRects, (ShortRect*)rects);
+  reg.setExtentsAndOrderedRects((const ShortRect*)extents,
+                                nRects, (const ShortRect*)rects);
   desktop[scrIdx]->add_changed(reg);
 }
 
@@ -340,8 +340,8 @@ void vncAddCopied(int scrIdx, const struct UpdateRect *extents,
 {
   Region reg;
 
-  reg.setExtentsAndOrderedRects((ShortRect*)extents,
-                                nRects, (ShortRect*)rects);
+  reg.setExtentsAndOrderedRects((const ShortRect*)extents,
+                                nRects, (const ShortRect*)rects);
   desktop[scrIdx]->add_copied(reg, rfb::Point(dx, dy));
 }