Skip to content

Commit

Permalink
Remove unused code from RegexGenerator (#76951)
Browse files Browse the repository at this point in the history
  • Loading branch information
MihaZupan committed Oct 13, 2022
1 parent e6f3aa9 commit 15aeb77
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions src/libraries/System.Text.RegularExpressions/gen/RegexGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -318,20 +318,5 @@ static bool HasCaseInsensitiveBackReferences(RegexNode node)
return false;
}
}

/// <summary>Computes a hash of the string.</summary>
/// <remarks>
/// Currently an FNV-1a hash function. The actual algorithm used doesn't matter; just something
/// simple to create a deterministic, pseudo-random value that's based on input text.
/// </remarks>
private static uint ComputeStringHash(string s)
{
uint hashCode = 2166136261;
foreach (char c in s)
{
hashCode = (c ^ hashCode) * 16777619;
}
return hashCode;
}
}
}

0 comments on commit 15aeb77

Please sign in to comment.