Skip to content

Commit

Permalink
Fix hash call.
Browse files Browse the repository at this point in the history
  • Loading branch information
DominicFrei committed Jun 29, 2021
1 parent ed0e671 commit 0856397
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Realm/Realm/DatabaseTypes/RealmObjectBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ internal void SetOwner(Realm realm, ObjectHandle objectHandle, Metadata metadata
_realm = realm;
_objectHandle = objectHandle;
_metadata = metadata;
_hashCode = new Lazy<int>(() => _objectHandle.GetHashCode());
_hashCode = new Lazy<int>(() => _objectHandle.GetObjHash());

if (_propertyChanged != null)
{
Expand Down
4 changes: 2 additions & 2 deletions Realm/Realm/Handles/ObjectHandle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,12 @@ public override bool Equals(object obj)
return result;
}

public ObjKey GetObjHash()
public Int32 GetObjHash()
{
var result = NativeMethods.get_hashcode(this, out var nativeException);
nativeException.ThrowIfNecessary();

return new ObjKey(result);
return result;
}

public override bool IsFrozen
Expand Down

0 comments on commit 0856397

Please sign in to comment.