From: bdemsky Date: Tue, 11 May 2004 19:33:49 +0000 (+0000) Subject: Forgot to implement this method. X-Git-Url: http://plrg.eecs.uci.edu/git/?p=repair.git;a=commitdiff_plain;h=15536ccfbf886e45242ebb29ee6df19c2e8dda02;ds=inline Forgot to implement this method. --- 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);