Add const OffsetTo<> dereference
Unused, but now that we have CrapPool, implement it.
This commit is contained in:
parent
2baa357ac7
commit
dcd1b07eea
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue