Re: C++ pushback

From: Avi Kivity
Date: Fri Apr 28 2006 - 04:30:08 EST


Avi Kivity wrote:
void put(Value& value)
{
// assumes value (or a value with an equal key) is not already in
Link& head = _buckets[Traits::hash(value) & (_size - 1)];
static_cast<Link&>(value).next = &head;
head.next= &value;
}
s/&head/head.next/ in the third line, of course.

--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/