From 15536ccfbf886e45242ebb29ee6df19c2e8dda02 Mon Sep 17 00:00:00 2001 From: bdemsky Date: Tue, 11 May 2004 19:33:49 +0000 Subject: [PATCH] Forgot to implement this method. --- Repair/RepairCompiler/MCC/Runtime/SimpleHash.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Repair/RepairCompiler/MCC/Runtime/SimpleHash.cc b/Repair/RepairCompiler/MCC/Runtime/SimpleHash.cc index e220276..63b23c3 100755 --- a/Repair/RepairCompiler/MCC/Runtime/SimpleHash.cc +++ b/Repair/RepairCompiler/MCC/Runtime/SimpleHash.cc @@ -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); -- 2.34.1