MCPcopy Create free account
hub / github.com/aldelaro5/dolphin-memory-engine / isSame

Method isSame

Source/Structs/FieldDef.cpp:105–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103}
104
105bool FieldDef::isSame(FieldDef* const other) const
106{
107 // May want to eventually include m_entry->m_base or m_entry->m_isUnsigned in this check.
108 if (m_size != other->m_size || m_structOffset != other->m_structOffset ||
109 m_entry->getLabel() != other->m_entry->getLabel() ||
110 m_entry->getType() != other->m_entry->getType() ||
111 Common::getSizeForType(m_entry->getType(), m_entry->getLength()) !=
112 Common::getSizeForType(other->m_entry->getType(), other->m_entry->getLength()) ||
113 m_entry->isBoundToPointer() != other->m_entry->isBoundToPointer())
114 return false;
115 if (m_entry->isBoundToPointer())
116 {
117 if (m_entry->getPointerLevel() != other->m_entry->getPointerLevel())
118 return false;
119 else
120 for (int i = 0; i < static_cast<int>(m_entry->getPointerLevel()); i++)
121 if (m_entry->getPointerOffset(i) != other->m_entry->getPointerOffset(i))
122 return false;
123 }
124 if (m_entry->getType() == Common::MemType::type_struct &&
125 m_entry->getStructName() != other->m_entry->getStructName())
126 return false;
127 return true;
128}
129
130QStringList FieldDef::diffList(FieldDef* const other) const
131{

Callers 1

Calls 8

getSizeForTypeFunction · 0.85
isBoundToPointerMethod · 0.80
getPointerLevelMethod · 0.80
getPointerOffsetMethod · 0.80
getLabelMethod · 0.45
getTypeMethod · 0.45
getLengthMethod · 0.45
getStructNameMethod · 0.45

Tested by

no test coverage detected