Skip to content

Commit 554c527

Browse files
committed
Add comments
1 parent cd06130 commit 554c527

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

QRCoder/QRCodeGenerator.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -943,8 +943,7 @@ private static BitArray PlainTextToBinaryByte(string plainText, EciMode eciMode,
943943
Span<byte> codeBytes = count < 3000 ? stackalloc byte[count] : new byte[count];
944944
targetEncoding.GetBytes(plainText, codeBytes);
945945
#else
946-
byte[] codeBytes;
947-
codeBytes = targetEncoding.GetBytes(plainText);
946+
byte[] codeBytes = targetEncoding.GetBytes(plainText);
948947
#endif
949948

950949
// Convert the array of bytes into a BitArray.
@@ -973,7 +972,7 @@ private static BitArray PlainTextToBinaryByte(string plainText, EciMode eciMode,
973972
/// <returns>A BitArray representing the bits of the input byteArray, with optional leading zeros.</returns>
974973
private static BitArray ToBitArray(
975974
#if NET5_0_OR_GREATER
976-
ReadOnlySpan<byte> byteArray,
975+
ReadOnlySpan<byte> byteArray, // byte[] has an implicit cast to ReadOnlySpan<byte>
977976
#else
978977
byte[] byteArray,
979978
#endif

0 commit comments

Comments
 (0)