summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2015-09-29 15:43:28 +0200
committerPierre Ossman <ossman@cendio.se>2015-09-29 15:43:28 +0200
commit063df03295d8b1477a292b4415e7d90a68c477d0 (patch)
tree399338f72c6d1dd8f2b755557abc696bd6367ec0
parent023df7effb247900c2c0748ce494f06dad00f0c3 (diff)
downloadtigervnc-063df03295d8b1477a292b4415e7d90a68c477d0.tar.gz
tigervnc-063df03295d8b1477a292b4415e7d90a68c477d0.zip
Avoid dropping const qualifier needlessly
-rw-r--r--common/rdr/MemInStream.h2
-rw-r--r--unix/xserver/hw/vnc/vncExtInit.cc8
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));
}