From 063df03295d8b1477a292b4415e7d90a68c477d0 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Tue, 29 Sep 2015 15:43:28 +0200 Subject: [PATCH] Avoid dropping const qualifier needlessly --- common/rdr/MemInStream.h | 2 +- unix/xserver/hw/vnc/vncExtInit.cc | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) 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)); } -- 2.39.5