Skip to content

Commit bf04694

Browse files
authored
Apply suggestions from code review
1 parent cf29ca3 commit bf04694

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

QRCoder/QRCodeGenerator.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -713,9 +713,9 @@ private static int GetCountIndicatorLength(int version, EncodingMode encMode)
713713
private static int GetDataLength(EncodingMode encoding, string plainText, BitArray codedText, bool forceUtf8)
714714
{
715715
// If UTF-8 is forced or the text is detected as UTF-8, return the number of bytes, otherwise return the character count.
716-
return forceUtf8 || IsUtf8(encoding, plainText, forceUtf8) ? (int)((uint)codedText.Length / 8) : plainText.Length;
716+
return forceUtf8 || IsUtf8() ? (int)((uint)codedText.Length / 8) : plainText.Length;
717717

718-
bool IsUtf8(EncodingMode encoding, string plainText, bool forceUtf8)
718+
bool IsUtf8()
719719
{
720720
return (encoding == EncodingMode.Byte && (!IsValidISO(plainText) || forceUtf8));
721721
}

0 commit comments

Comments
 (0)