aboutsummaryrefslogtreecommitdiffstats
path: root/common/rfb/Cursor.cxx
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2024-04-21 02:18:22 +0200
committerPierre Ossman <ossman@cendio.se>2024-06-24 14:22:35 +0200
commit12b3f4021641537b90727b23d42de5dff59006cd (patch)
treed494cda8c019a53989099a44b05aca2e0a4fff8a /common/rfb/Cursor.cxx
parent4a71ac5bb79e3cd53499255f231c490fc9a5627b (diff)
downloadtigervnc-12b3f4021641537b90727b23d42de5dff59006cd.tar.gz
tigervnc-12b3f4021641537b90727b23d42de5dff59006cd.zip
Avoid shadowing variables
It's a source of confusion and possibly bugs to reuse the same variable name for multiple things.
Diffstat (limited to 'common/rfb/Cursor.cxx')
-rw-r--r--common/rfb/Cursor.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/rfb/Cursor.cxx b/common/rfb/Cursor.cxx
index f0c72eed..fa596bc5 100644
--- a/common/rfb/Cursor.cxx
+++ b/common/rfb/Cursor.cxx
@@ -33,11 +33,11 @@ using namespace rfb;
static LogWriter vlog("Cursor");
Cursor::Cursor(int width, int height, const Point& hotspot,
- const uint8_t* data) :
+ const uint8_t* data_) :
width_(width), height_(height), hotspot_(hotspot)
{
- this->data = new uint8_t[width_*height_*4];
- memcpy(this->data, data, width_*height_*4);
+ data = new uint8_t[width_*height_*4];
+ memcpy(data, data_, width_*height_*4);
}
Cursor::Cursor(const Cursor& other) :