Remove redundant Region::copyFrom()
We already have an assignment operator, so no need for this method.
diff --git a/common/rfb/EncodeManager.cxx b/common/rfb/EncodeManager.cxx
index 4f6ad5a..0ceec8f 100644
--- a/common/rfb/EncodeManager.cxx
+++ b/common/rfb/EncodeManager.cxx
@@ -255,7 +255,7 @@
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 995f8c5..c17c5d4 100644
--- a/common/rfb/Region.cxx
+++ b/common/rfb/Region.cxx
@@ -143,10 +143,6 @@
}
}
-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 9337556..9e53d36 100644
--- a/common/rfb/Region.h
+++ b/common/rfb/Region.h
@@ -52,7 +52,6 @@
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 924f724..0b79dc1 100644
--- a/common/rfb/VNCSConnectionST.cxx
+++ b/common/rfb/VNCSConnectionST.cxx
@@ -996,7 +996,7 @@
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()) {