X-Git-Url: http://plrg.eecs.uci.edu/git/?p=junction.git;a=blobdiff_plain;f=junction%2Fdetails%2FGrampa.h;h=9f85df249fba655a458c13ab21708e5a93cf4879;hp=e6287578e0fc33955a4e00a548126144fffbb08c;hb=6a7fe65045a50f9830aa674fcacf16f4e580eaa2;hpb=5ef33e5ba05721c917894fbe41f02394e719d1ce diff --git a/junction/details/Grampa.h b/junction/details/Grampa.h index e628757..9f85df2 100644 --- a/junction/details/Grampa.h +++ b/junction/details/Grampa.h @@ -110,7 +110,7 @@ struct Grampa { : sizeMask(sizeMask), baseHash(baseHash), unsafeRangeShift(unsafeRangeShift) { } - static Table* create(ureg tableSize, ureg baseHash, ureg unsafeShift) { + static Table* create(ureg tableSize, Hash baseHash, ureg unsafeShift) { TURF_ASSERT(turf::util::isPowerOf2(tableSize)); TURF_ASSERT(unsafeShift > 0 && unsafeShift <= sizeof(Hash) * 8); TURF_ASSERT(tableSize >= 4); @@ -362,7 +362,7 @@ struct Grampa { TURF_TRACE(Grampa, 3, "[insert] called", uptr(table), hash); TURF_ASSERT(table); TURF_ASSERT(hash != KeyTraits::NullHash); - ureg idx = hash; + ureg idx = ureg(hash); // Check hashed cell first, though it may not even belong to the bucket. CellGroup* group = table->getCellGroups() + ((idx & sizeMask) >> 2);