mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 20:12:21 +02:00
Fixed const expression hashing
This commit is contained in:
parent
a6e191d2f1
commit
6b67a4493d
1 changed files with 1 additions and 4 deletions
|
@ -2648,10 +2648,7 @@ int BfResolvedTypeSet::Hash(BfType* type, LookupContext* ctx, bool allowRef)
|
|||
else if (type->IsConstExprValue())
|
||||
{
|
||||
BfConstExprValueType* constExprValueType = (BfConstExprValueType*)type;
|
||||
int hashVal = (constExprValueType->mValue.mInt32 << 17) ^ HASH_CONSTTYPE;
|
||||
int elemHash = Hash(constExprValueType->mType, ctx);
|
||||
hashVal = ((hashVal ^ elemHash) << 5) - hashVal;
|
||||
return hashVal;
|
||||
return ((int)constExprValueType->mValue.mTypeCode << 17) ^ (constExprValueType->mValue.mInt32 << 3) ^ HASH_CONSTTYPE;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue