提交 dcd1b07e 编写于 作者: B Behdad Esfahbod

Add const OffsetTo<> dereference

Unused, but now that we have CrapPool, implement it.
上级 2baa357a
......@@ -779,6 +779,12 @@ struct OffsetTo : Offset<OffsetType>
{
unsigned int offset = *this;
if (unlikely (!offset)) return Null(Type);
return StructAtOffset<const Type> (base, offset);
}
inline Type& operator () (void *base) const
{
unsigned int offset = *this;
if (unlikely (!offset)) return Crap(Type);
return StructAtOffset<Type> (base, offset);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册