Added parens for clarity
MODIFY
WalletWasabi.Gui/Controls/QrEncoder/DataEncodation/ECISet.cs
WalletWasabi.Gui/Controls/QrEncoder/DataEncodation/ECISet.cs
@@ -194,19 +194,19 @@ namespace Gma.QrCodeNet.Encoding.DataEncodation
case 1:
//Indicator = 0. Page 24. Chapter 6.4.2.1
dataBits.Add((int)ECICodewordsLength.One, 1);
- eciAssignmentBits = eciAssignmentByte * 8 - 1;
+ eciAssignmentBits = (eciAssignmentByte * 8) - 1;
break;
case 2:
//Indicator = 10. Page 24. Chapter 6.4.2.1
dataBits.Add((int)ECICodewordsLength.Two, 2);
- eciAssignmentBits = eciAssignmentByte * 8 - 2;
+ eciAssignmentBits = (eciAssignmentByte * 8) - 2;
break;
case 3:
//Indicator = 110. Page 24. Chapter 6.4.2.1
dataBits.Add((int)ECICodewordsLength.Three, 3);
- eciAssignmentBits = eciAssignmentByte * 8 - 3;
+ eciAssignmentBits = (eciAssignmentByte * 8) - 3;
break;
default:

MODIFY
WalletWasabi.Gui/Controls/QrEncoder/Masking/Pattern5.cs
WalletWasabi.Gui/Controls/QrEncoder/Masking/Pattern5.cs
@@ -6,7 +6,7 @@ namespace Gma.QrCodeNet.Encoding.Masking
{
public override bool this[int i, int j]
{
- get { return (i * j) % 2 + (i * j) % 3 == 0; }
+ get { return i * j % 2 + (i * j) % 3 == 0; }
set { throw new NotSupportedException(); }
}

MODIFY
WalletWasabi.Gui/Controls/QrEncoder/Masking/Pattern6.cs
WalletWasabi.Gui/Controls/QrEncoder/Masking/Pattern6.cs
@@ -6,7 +6,7 @@ namespace Gma.QrCodeNet.Encoding.Masking
{
public override bool this[int i, int j]
{
- get { return ((i * j) % 2 + (i * j) % 3) % 2 == 0; }
+ get { return ((i * j) % 2 + ((i * j) % 3)) % 2 == 0; }
set { throw new NotSupportedException(); }
}

MODIFY
WalletWasabi.Gui/Controls/QrEncoder/Masking/Pattern7.cs
WalletWasabi.Gui/Controls/QrEncoder/Masking/Pattern7.cs
@@ -6,7 +6,7 @@ namespace Gma.QrCodeNet.Encoding.Masking
{
public override bool this[int i, int j]
{
- get { return ((i * j) % 3 + (i + j) % 2) % 2 == 0; }
+ get { return (((i * j) % 3) + (i + j) % 2) % 2 == 0; }
set { throw new NotSupportedException(); }
}

MODIFY
WalletWasabi.Gui/Controls/QrEncoder/Masking/Scoring/Penalty4.cs
WalletWasabi.Gui/Controls/QrEncoder/Masking/Scoring/Penalty4.cs
double ratio = (double)DarkBitCount / MatrixCount;
- return System.Math.Abs((int)(ratio * 100 - 50)) / 5 * 10;
+ return System.Math.Abs((int)((ratio * 100) - 50)) / 5 * 10;
}
}
}

MODIFY
WalletWasabi.Gui/Controls/QrEncoder/VersionDetail.cs
WalletWasabi.Gui/Controls/QrEncoder/VersionDetail.cs
internal static int Width(int version)
{
- return 17 + 4 * version;
+ return 17 + (4 * version);
}
internal int ECBlockGroup1

MODIFY
WalletWasabi.Gui/Controls/QrEncoder/Versions/QRCodeVersion.cs
WalletWasabi.Gui/Controls/QrEncoder/Versions/QRCodeVersion.cs
VersionNum = versionNum;
TotalCodewords = totalCodewords;
_m_ECBlocks = new ErrorCorrectionBlocks[] { ecblocksL, ecblocksM, ecblocksQ, ecblocksH };
- DimensionForVersion = 17 + versionNum * 4;
+ DimensionForVersion = 17 + (versionNum * 4);
}
internal ErrorCorrectionBlocks GetECBlocksByLevel(Gma.QrCodeNet.Encoding.ErrorCorrectionLevel ECLevel)

Added parens for clarity