summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2018-03-22 16:00:18 +0100
committerPierre Ossman <ossman@cendio.se>2018-03-28 12:43:52 +0200
commit74385d38902a54b06af10c1bc6fc0d322b0fabb9 (patch)
tree7fd23ea5219dabf6802823990d7ad9eb3a9f0f55 /common
parent8c3bd691885bef673faf3599ea663d847a17b78f (diff)
downloadtigervnc-74385d38902a54b06af10c1bc6fc0d322b0fabb9.tar.gz
tigervnc-74385d38902a54b06af10c1bc6fc0d322b0fabb9.zip
Remove redundant Region::copyFrom()
We already have an assignment operator, so no need for this method.
Diffstat (limited to 'common')
-rw-r--r--common/rfb/EncodeManager.cxx2
-rw-r--r--common/rfb/Region.cxx4
-rw-r--r--common/rfb/Region.h1
-rw-r--r--common/rfb/VNCSConnectionST.cxx2
4 files changed, 2 insertions, 7 deletions
diff --git a/common/rfb/EncodeManager.cxx b/common/rfb/EncodeManager.cxx
index 4f6ad5a2..0ceec8fd 100644
--- a/common/rfb/EncodeManager.cxx
+++ b/common/rfb/EncodeManager.cxx
@@ -255,7 +255,7 @@ void EncodeManager::writeUpdate(const UpdateInfo& ui, const PixelBuffer* pb,
prepareEncoders();
- changed.copyFrom(ui.changed);
+ changed = ui.changed;
/*
* We need to render the cursor seperately as it has its own
diff --git a/common/rfb/Region.cxx b/common/rfb/Region.cxx
index 995f8c5b..c17c5d48 100644
--- a/common/rfb/Region.cxx
+++ b/common/rfb/Region.cxx
@@ -143,10 +143,6 @@ void rfb::Region::setExtentsAndOrderedRects(const ShortRect* extents,
}
}
-void rfb::Region::copyFrom(const rfb::Region& r) {
- XUnionRegion(r.xrgn, r.xrgn, xrgn);
-}
-
void rfb::Region::assign_intersect(const rfb::Region& r) {
XIntersectRegion(xrgn, r.xrgn, xrgn);
}
diff --git a/common/rfb/Region.h b/common/rfb/Region.h
index 93375569..9e53d362 100644
--- a/common/rfb/Region.h
+++ b/common/rfb/Region.h
@@ -52,7 +52,6 @@ namespace rfb {
void setOrderedRects(const std::vector<Rect>& rects);
void setExtentsAndOrderedRects(const ShortRect* extents, int nRects,
const ShortRect* rects);
- void copyFrom(const Region& r);
void assign_intersect(const Region& r);
void assign_union(const Region& r);
diff --git a/common/rfb/VNCSConnectionST.cxx b/common/rfb/VNCSConnectionST.cxx
index 924f724b..0b79dc10 100644
--- a/common/rfb/VNCSConnectionST.cxx
+++ b/common/rfb/VNCSConnectionST.cxx
@@ -996,7 +996,7 @@ void VNCSConnectionST::writeDataUpdate()
if (!ui.copied.is_empty() && !damagedCursorRegion.is_empty()) {
Region bogusCopiedCursor;
- bogusCopiedCursor.copyFrom(damagedCursorRegion);
+ bogusCopiedCursor = damagedCursorRegion;
bogusCopiedCursor.translate(ui.copy_delta);
bogusCopiedCursor.assign_intersect(server->pb->getRect());
if (!ui.copied.intersect(bogusCopiedCursor).is_empty()) {