Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Shane32 committed May 7, 2024
1 parent e08d6e3 commit cd06130
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion QRCoder/QRCodeGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -751,12 +751,13 @@ bool IsUtf8()
/// </summary>
private static bool IsValidISO(string input)
{
// No heap allocations if the string is ISO-8859-1
try
{
_ = _iso88591ExceptionFallback.GetByteCount(input);
return true;
}
catch (EncoderFallbackException)
catch (EncoderFallbackException) // The exception is a heap allocation and not ideal
{
return false;
}
Expand Down

0 comments on commit cd06130

Please sign in to comment.