250 |
* characteristic is compared as well. So a @c double type and @c double* |
* characteristic is compared as well. So a @c double type and @c double* |
251 |
* type are also considered to be not equal data types and hence this method |
* type are also considered to be not equal data types and hence this method |
252 |
* would return @c false. |
* would return @c false. |
253 |
|
* |
254 |
|
* As an exception here, classes and structs with the same class/struct name |
255 |
|
* but different sizes are also considered to be "equal". This relaxed |
256 |
|
* requirement is necessary to retain backward compatiblity to older |
257 |
|
* versions of the same native C++ classes/structs. |
258 |
*/ |
*/ |
259 |
bool DataType::operator==(const DataType& other) const { |
bool DataType::operator==(const DataType& other) const { |
260 |
return m_baseTypeName == other.m_baseTypeName && |
return m_baseTypeName == other.m_baseTypeName && |
261 |
m_customTypeName == other.m_customTypeName && |
m_customTypeName == other.m_customTypeName && |
262 |
m_size == other.m_size && |
(m_size == other.m_size || (isClass() && other.isClass())) && |
263 |
m_isPointer == other.m_isPointer; |
m_isPointer == other.m_isPointer; |
264 |
} |
} |
265 |
|
|