checkin from browser
authorClaus Gittinger <cg@exept.de>
Sat, 01 Mar 1997 01:01:21 +0100
changeset 2427 d09f8539fa47
parent 2426 3b04313af90e
child 2428 d54efc515824
checkin from browser
Set.st
--- a/Set.st	Fri Feb 28 17:22:10 1997 +0100
+++ b/Set.st	Sat Mar 01 01:01:21 1997 +0100
@@ -563,7 +563,16 @@
      to redefine it. (which may be a bad design decision, but slightly
      improves performance, by avoiding an extra message send ...)"
 
-    ^ (hashKey * 2 \\ length) + 1.
+    |index|
+
+    index := hashKey.
+    index < 16r1FFFFFFF ifTrue:[
+        index := index * 2
+    ].
+    index := index \\ length + 1.
+    ^ index.
+
+    "Modified: 1.3.1997 / 01:01:13 / cg"
 !
 
 keyContainerOfSize:n
@@ -684,6 +693,6 @@
 !Set class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Set.st,v 1.47 1997-02-12 13:16:59 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Set.st,v 1.48 1997-03-01 00:01:21 cg Exp $'
 ! !
 Set initialize!