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

Unified Diff: xfa/fxbarcode/cbc_qrcode.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/cbc_qrcode.h ('k') | xfa/fxbarcode/cbc_upca.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxbarcode/cbc_qrcode.cpp
diff --git a/xfa/fxbarcode/cbc_qrcode.cpp b/xfa/fxbarcode/cbc_qrcode.cpp
index db3cad0ddab6a982d76f6658d4779bebca1f63b9..507b8f9ffe98f7b52b124d256d6e946e1b2caa08 100644
--- a/xfa/fxbarcode/cbc_qrcode.cpp
+++ b/xfa/fxbarcode/cbc_qrcode.cpp
@@ -27,51 +27,51 @@ CBC_QRCode::CBC_QRCode() : CBC_CodeBase(new CBC_QRCodeWriter) {}
CBC_QRCode::~CBC_QRCode() {}
-FX_BOOL CBC_QRCode::SetVersion(int32_t version) {
+bool CBC_QRCode::SetVersion(int32_t version) {
if (version < 0 || version > 40)
- return FALSE;
+ return false;
return m_pBCWriter &&
static_cast<CBC_QRCodeWriter*>(m_pBCWriter.get())->SetVersion(version);
}
-FX_BOOL CBC_QRCode::SetErrorCorrectionLevel(int32_t level) {
+bool CBC_QRCode::SetErrorCorrectionLevel(int32_t level) {
if (level < 0 || level > 3)
- return FALSE;
+ return false;
return m_pBCWriter &&
static_cast<CBC_TwoDimWriter*>(m_pBCWriter.get())
->SetErrorCorrectionLevel(level);
}
-FX_BOOL CBC_QRCode::Encode(const CFX_WideStringC& contents,
- FX_BOOL isDevice,
- int32_t& e) {
+bool CBC_QRCode::Encode(const CFX_WideStringC& contents,
+ bool isDevice,
+ int32_t& e) {
int32_t outWidth = 0;
int32_t outHeight = 0;
CBC_QRCodeWriter* pWriter = static_cast<CBC_QRCodeWriter*>(m_pBCWriter.get());
uint8_t* data = pWriter->Encode(CFX_WideString(contents),
pWriter->GetErrorCorrectionLevel(), outWidth,
outHeight, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
+ BC_EXCEPTION_CHECK_ReturnValue(e, false);
pWriter->RenderResult(data, outWidth, outHeight, e);
FX_Free(data);
- BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
- return TRUE;
+ BC_EXCEPTION_CHECK_ReturnValue(e, false);
+ return true;
}
-FX_BOOL CBC_QRCode::RenderDevice(CFX_RenderDevice* device,
- const CFX_Matrix* matrix,
- int32_t& e) {
+bool CBC_QRCode::RenderDevice(CFX_RenderDevice* device,
+ const CFX_Matrix* matrix,
+ int32_t& e) {
static_cast<CBC_TwoDimWriter*>(m_pBCWriter.get())
->RenderDeviceResult(device, matrix);
- return TRUE;
+ return true;
}
-FX_BOOL CBC_QRCode::RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) {
+bool CBC_QRCode::RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) {
static_cast<CBC_TwoDimWriter*>(m_pBCWriter.get())
->RenderBitmapResult(pOutBitmap, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
- return TRUE;
+ BC_EXCEPTION_CHECK_ReturnValue(e, false);
+ return true;
}
BC_TYPE CBC_QRCode::GetType() {
« no previous file with comments | « xfa/fxbarcode/cbc_qrcode.h ('k') | xfa/fxbarcode/cbc_upca.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698