Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(672)

Unified Diff: xfa/fxbarcode/qrcode/BC_QRCoderMaskUtil.cpp

Issue 2467203003: Remove FX_BOOL from xfa. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fxbarcode/qrcode/BC_QRCoderMaskUtil.h ('k') | xfa/fxbarcode/qrcode/BC_QRCoderMatrixUtil.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxbarcode/qrcode/BC_QRCoderMaskUtil.cpp
diff --git a/xfa/fxbarcode/qrcode/BC_QRCoderMaskUtil.cpp b/xfa/fxbarcode/qrcode/BC_QRCoderMaskUtil.cpp
index 4d845c4b07680d15f33d18f048b7a8bcf8335268..8342b9b6db557269ef836704192887f711d730c7 100644
--- a/xfa/fxbarcode/qrcode/BC_QRCoderMaskUtil.cpp
+++ b/xfa/fxbarcode/qrcode/BC_QRCoderMaskUtil.cpp
@@ -30,8 +30,8 @@ CBC_QRCoderMaskUtil::CBC_QRCoderMaskUtil() {}
CBC_QRCoderMaskUtil::~CBC_QRCoderMaskUtil() {}
int32_t CBC_QRCoderMaskUtil::ApplyMaskPenaltyRule1(
CBC_CommonByteMatrix* matrix) {
- return ApplyMaskPenaltyRule1Internal(matrix, TRUE) +
- ApplyMaskPenaltyRule1Internal(matrix, FALSE);
+ return ApplyMaskPenaltyRule1Internal(matrix, true) +
+ ApplyMaskPenaltyRule1Internal(matrix, false);
}
int32_t CBC_QRCoderMaskUtil::ApplyMaskPenaltyRule2(
@@ -122,13 +122,13 @@ int32_t CBC_QRCoderMaskUtil::ApplyMaskPenaltyRule4(
double darkRatio = (double)numDarkCells / numTotalCells;
return abs((int32_t)(darkRatio * 100 - 50) / 5) * 5 * 10;
}
-FX_BOOL CBC_QRCoderMaskUtil::GetDataMaskBit(int32_t maskPattern,
- int32_t x,
- int32_t y,
- int32_t& e) {
+bool CBC_QRCoderMaskUtil::GetDataMaskBit(int32_t maskPattern,
+ int32_t x,
+ int32_t y,
+ int32_t& e) {
if (!CBC_QRCoder::IsValidMaskPattern(maskPattern)) {
e = (BCExceptionInvalidateMaskPattern);
- BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
+ BC_EXCEPTION_CHECK_ReturnValue(e, false);
}
int32_t intermediate = 0, temp = 0;
switch (maskPattern) {
@@ -161,14 +161,14 @@ FX_BOOL CBC_QRCoderMaskUtil::GetDataMaskBit(int32_t maskPattern,
break;
default: {
e = BCExceptionInvalidateMaskPattern;
- BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
+ BC_EXCEPTION_CHECK_ReturnValue(e, false);
}
}
return intermediate == 0;
}
int32_t CBC_QRCoderMaskUtil::ApplyMaskPenaltyRule1Internal(
CBC_CommonByteMatrix* matrix,
- FX_BOOL isHorizontal) {
+ bool isHorizontal) {
int32_t penalty = 0;
int32_t numSameBitCells = 0;
int32_t prevBit = -1;
« no previous file with comments | « xfa/fxbarcode/qrcode/BC_QRCoderMaskUtil.h ('k') | xfa/fxbarcode/qrcode/BC_QRCoderMatrixUtil.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698