]> source.dussan.org Git - tigervnc.git/commitdiff
Minor optimization in new Hextile encoder. Values in m_counts map were
authorConstantin Kaplinsky <const@tightvnc.com>
Fri, 9 Sep 2005 19:57:49 +0000 (19:57 +0000)
committerConstantin Kaplinsky <const@tightvnc.com>
Fri, 9 Sep 2005 19:57:49 +0000 (19:57 +0000)
made short instead of int.

git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@314 3789f03b-4d11-0410-bbf8-ca57d06f2519

rfb/hextileEncodeBetter.h

index c63ee14328ae492b3ec898b70c65639d92480677..a38648cb3c0702b5f499ef6b1d53db7a84cfac95 100644 (file)
@@ -83,7 +83,7 @@ class HEXTILE_SUBRECTS_TABLE {
 
   /* FIXME: Use array for (BPP == 8)? */
   /* DEBUG: Use own hashing like in ZRLE? */
-  std::map<PIXEL_T,int> m_counts;
+  std::map<PIXEL_T,short> m_counts;
 };
 
 HEXTILE_SUBRECTS_TABLE::HEXTILE_SUBRECTS_TABLE()
@@ -163,7 +163,7 @@ int HEXTILE_SUBRECTS_TABLE::buildTables()
 
   // Choose the best background color
   int maxCount = 0, count;
-  std::map<PIXEL_T,int>::iterator i;
+  std::map<PIXEL_T,short>::iterator i;
   for (i = m_counts.begin(); i != m_counts.end(); i++) {
     color = (*i).first;
     count = (*i).second;