From: Pierre Ossman Date: Tue, 29 Sep 2015 13:43:28 +0000 (+0200) Subject: Avoid dropping const qualifier needlessly X-Git-Tag: v1.5.90~19 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=063df03295d8b1477a292b4415e7d90a68c477d0;p=tigervnc.git Avoid dropping const qualifier needlessly --- diff --git a/common/rdr/MemInStream.h b/common/rdr/MemInStream.h index 77ca3f3a..1a6a7982 100644 --- a/common/rdr/MemInStream.h +++ b/common/rdr/MemInStream.h @@ -45,7 +45,7 @@ namespace rdr { virtual ~MemInStream() { if (deleteWhenDone) - delete [] (U8*)start; + delete [] start; } int pos() { return ptr - start; } diff --git a/unix/xserver/hw/vnc/vncExtInit.cc b/unix/xserver/hw/vnc/vncExtInit.cc index 0ae55b6f..2d918b04 100644 --- a/unix/xserver/hw/vnc/vncExtInit.cc +++ b/unix/xserver/hw/vnc/vncExtInit.cc @@ -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)); }