Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Molaro <lupus@oddwiz.org>2006-02-28 16:22:44 +0300
committerPaolo Molaro <lupus@oddwiz.org>2006-02-28 16:22:44 +0300
commitd4d091c6e565606e945bbb1f25d556c18adc9ba7 (patch)
tree362384f264e8a14b55b3c25741167fd812f0e91e
parentfe120c12ff512b4fbdf3d0f852461471fa319804 (diff)
Tue Feb 28 14:16:25 CET 2006 Paolo Molaro <lupus@ximian.com>
* BitArray.cs: reintroduce optimization carelessly removed by Robitaille. svn path=/trunk/mcs/; revision=57389
-rw-r--r--mcs/class/corlib/System.Collections/BitArray.cs6
-rw-r--r--mcs/class/corlib/System.Collections/ChangeLog6
2 files changed, 9 insertions, 3 deletions
diff --git a/mcs/class/corlib/System.Collections/BitArray.cs b/mcs/class/corlib/System.Collections/BitArray.cs
index 320ff9868c8..1ecb765c932 100644
--- a/mcs/class/corlib/System.Collections/BitArray.cs
+++ b/mcs/class/corlib/System.Collections/BitArray.cs
@@ -291,7 +291,7 @@ namespace System.Collections {
if (index < 0 || index >= m_length)
throw new ArgumentOutOfRangeException ();
- return (m_array [index / 32] & (1 << (index % 32))) != 0;
+ return (m_array [index >> 5] & (1 << (index & 31))) != 0;
}
public void Set (int index, bool value)
@@ -300,9 +300,9 @@ namespace System.Collections {
throw new ArgumentOutOfRangeException ();
if (value)
- m_array [index / 32] |= (1 << (index % 32));
+ m_array [index >> 5] |= (1 << (index & 31));
else
- m_array [index / 32] &= ~(1 << (index % 32));
+ m_array [index >> 5] &= ~(1 << (index & 31));
_version++;
}
diff --git a/mcs/class/corlib/System.Collections/ChangeLog b/mcs/class/corlib/System.Collections/ChangeLog
index 0b0c78b0b6a..a4f41200ed2 100644
--- a/mcs/class/corlib/System.Collections/ChangeLog
+++ b/mcs/class/corlib/System.Collections/ChangeLog
@@ -1,3 +1,9 @@
+
+Tue Feb 28 14:16:25 CET 2006 Paolo Molaro <lupus@ximian.com>
+
+ * BitArray.cs: reintroduce optimization carelessly removed by
+ Robitaille.
+
2006-02-03 Sebastien Robitaille <sebastien.robitaille@croesus.com>
* BitArray.cs: Renamed members for interoperability with MS.