Minor code enhancement: using an inline function instead of inline arithmetic.


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2412 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/unix/x0vncserver/PollingManager.cxx b/unix/x0vncserver/PollingManager.cxx
index 0c35c40..b3934a2 100644
--- a/unix/x0vncserver/PollingManager.cxx
+++ b/unix/x0vncserver/PollingManager.cxx
@@ -257,10 +257,6 @@
     w += correction;
   }
 
-  // Compute a pointer to the corresponding element of m_changeFlags.
-  // FIXME: Provide an inline function for that?
-  bool *pChangeFlags = &m_changeFlags[(y / 32) * m_widthTiles + (x / 32)];
-
   // Read a row from the screen. Note that getFullRow() may be more
   // efficient than getRow() which is more general.
   // FIXME: Move the logic to getRow()?
@@ -270,7 +266,10 @@
     getRow(x, y, w);
   }
 
-  // Compute pointers to images to be compared.
+  // Compute a pointer to the initial element of m_changeFlags.
+  bool *pChangeFlags = &m_changeFlags[getTileIndex(x, y)];
+
+  // Compute pointers to image data to be compared.
   char *ptr_old = m_image->locatePixel(x, y);
   char *ptr_new = m_rowImage->xim->data;