Skip to content

Commit

Permalink
BufferView: added reference equality check
Browse files Browse the repository at this point in the history
  • Loading branch information
luithefirst committed Oct 6, 2024
1 parent 60bf599 commit cabbc08
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Aardvark.Rendering/Resources/Adaptive/BufferView.fs
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,11 @@ type BufferView(buffer : aval<IBuffer>, elementType : Type,
HashCode.Combine(buffer.GetHashCode(), elementType.GetHashCode(), offset.GetHashCode(), stride.GetHashCode(), normalized.GetHashCode())

override x.Equals o =
match o with
| :? BufferView as o ->
o.Buffer = buffer && o.ElementType = elementType && o.Offset = offset && o.Stride = stride && o.Normalized = normalized
| _ -> false
Object.ReferenceEquals(x, o) ||
match o with
| :? BufferView as o ->
o.Buffer = buffer && o.ElementType = elementType && o.Offset = offset && o.Stride = stride && o.Normalized = normalized
| _ -> false

[<CompilationRepresentation(CompilationRepresentationFlags.ModuleSuffix)>]
module BufferView =
Expand Down

0 comments on commit cabbc08

Please sign in to comment.