Forgot to implement this method.
authorbdemsky <bdemsky>
Tue, 11 May 2004 19:33:49 +0000 (19:33 +0000)
committerbdemsky <bdemsky>
Tue, 11 May 2004 19:33:49 +0000 (19:33 +0000)
Repair/RepairCompiler/MCC/Runtime/SimpleHash.cc

index e2202765a54fbdd90378484c775c5cc28426fda2..63b23c3736b8d2b991725c88f355030a1e65bbfc 100755 (executable)
@@ -174,6 +174,19 @@ SimpleHash::~SimpleHash() {
   }
 }
 
+int SimpleHash::firstkey() {
+  struct ArraySimple *ptr=listhead;
+  int index=0;
+  while((index==ARRAYSIZE)||!ptr->nodes[index].inuse) {
+    if (index==ARRAYSIZE) {
+      index=0;
+      ptr=ptr->nextarray;
+    } else
+      index++;
+  }
+  return ptr->nodes[index].key;
+}
+
 void SimpleHash::addParent(SimpleHash* parent) {
     parents[numparents++] = parent;
     parent->addChild(this);