]> source.dussan.org Git - tigervnc.git/commitdiff
Fix for "Invalid use of member 'stats' in static member function"
authorBrian P. Hinz <bphinz@users.sf.net>
Fri, 10 Mar 2017 00:25:39 +0000 (19:25 -0500)
committerBrian P. Hinz <bphinz@users.sf.net>
Sat, 11 Mar 2017 00:49:47 +0000 (19:49 -0500)
vncviewer/DesktopWindow.cxx

index 1f0f55f2b6fd0c9b3ac9102a44320bbf61506b8b..7941c683d24bb676ccc9faaa9227870b93d13541 100644 (file)
@@ -1194,7 +1194,7 @@ void DesktopWindow::handleStatsTimeout(void *data)
 {
   DesktopWindow *self = (DesktopWindow*)data;
 
-  const size_t statsCount = sizeof(stats)/sizeof(stats[0]);
+  const size_t statsCount = sizeof(self->stats)/sizeof(self->stats[0]);
 
   unsigned frame, pixels, pos;
   unsigned elapsed;
@@ -1219,7 +1219,7 @@ void DesktopWindow::handleStatsTimeout(void *data)
   if (elapsed < 1)
     elapsed = 1;
 
-  memmove(&self->stats[0], &self->stats[1], sizeof(stats[0])*(statsCount-1));
+  memmove(&self->stats[0], &self->stats[1], sizeof(self->stats[0])*(statsCount-1));
 
   self->stats[statsCount-1].fps = (frame - self->statsLastFrame) * 1000 / elapsed;
   self->stats[statsCount-1].pps = (pixels - self->statsLastPixels) * 1000 / elapsed;