Author: alanmc
Date: 2007-12-21 10:26:03 -0500 (Fri, 21 Dec 2007)
New Revision: 91764

Modified:
   trunk/bitsharp/src/MonoTorrent/Tracker/ByteComparer.cs
Log:
Made the hashcode slightly better by bitshifting the bytes.

Modified: trunk/bitsharp/src/MonoTorrent/Tracker/ByteComparer.cs
===================================================================
--- trunk/bitsharp/src/MonoTorrent/Tracker/ByteComparer.cs      2007-12-21 
15:25:35 UTC (rev 91763)
+++ trunk/bitsharp/src/MonoTorrent/Tracker/ByteComparer.cs      2007-12-21 
15:26:03 UTC (rev 91764)
@@ -68,7 +68,7 @@
             else
             {
                 for (int i = 0; i < array.Length; i++)
-                    result ^= array[i];
+                    result ^= array[i] << i;
             }
 
             return result;

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to