}
}
- if (decltype(InstantiatedMethodDesc::m_pPerInstInfo)::isRelative)
- {
- image->FixupRelativePointerField(this, offsetof(InstantiatedMethodDesc, m_pPerInstInfo));
- }
- else
- {
- image->FixupPointerField(this, offsetof(InstantiatedMethodDesc, m_pPerInstInfo));
- }
+ image->FixupPlainOrRelativePointerField((InstantiatedMethodDesc*) this, &InstantiatedMethodDesc::m_pPerInstInfo);
// Generic methods are dealt with specially to avoid encoding the formal method type parameters
if (IsTypicalMethodDefinition())
NDirectMethodDesc *pNMD = (NDirectMethodDesc *)this;
- if (decltype(NDirectMethodDesc::ndirect.m_pWriteableData)::isRelative)
- {
- image->FixupRelativePointerField(this, offsetof(NDirectMethodDesc, ndirect.m_pWriteableData));
- }
- else
- {
- image->FixupPointerField(this, offsetof(NDirectMethodDesc, ndirect.m_pWriteableData));
- }
+ image->FixupPlainOrRelativePointerField(pNMD, &NDirectMethodDesc::ndirect, &decltype(NDirectMethodDesc::ndirect)::m_pWriteableData);
NDirectWriteableData *pWriteableData = pNMD->GetWriteableData();
NDirectImportThunkGlue *pImportThunkGlue = pNMD->GetNDirectImportThunkGlue();