Skip to content

Commit

Permalink
Remove comment
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-strecker-sonarsource committed Mar 27, 2023
1 parent b3470bb commit a918e14
Showing 1 changed file with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ public sealed record ProgramState : IEquatable<ProgramState>
private int? exceptionsHashCode;
private int? hashCode;

// Current SymbolicValue result of a given operation
private ImmutableDictionary<IOperation, SymbolicValue> OperationValue { get => operationValue; init => SetCachedHashCodeField(value, ref operationValue, ref operationValueHashCode); }
private ImmutableDictionary<ISymbol, SymbolicValue> SymbolValue { get => symbolValue; init => SetCachedHashCodeField(value, ref symbolValue, ref symbolValueHashCode); }
private ImmutableDictionary<int, int> VisitCount { get; init; }
Expand Down Expand Up @@ -231,5 +230,22 @@ private void SetCachedHashCodeField<T>(T value, ref T backingField, ref int? bac
hashCode = null;
}
}

private struct ContentImmutableDictionary<TKey, TValue> : IEquatable<ContentImmutableDictionary<TKey, TValue>>
{
private readonly ImmutableDictionary<TKey, TValue> dictionary;
private int? hashCode;

public ContentImmutableDictionary(ImmutableDictionary<TKey, TValue> dictionary)
{
this.dictionary = dictionary;
}

public bool Equals(ContentImmutableDictionary<TKey, TValue> other) =>
dictionary.DictionaryEquals(other.dictionary);

public override int GetHashCode() =>
hashCode ??= HashCode.DictionaryContentHash(dictionary);
}
}
}

0 comments on commit a918e14

Please sign in to comment.