Make BC_TYPE an enum class
-- rewrite some strange expressions using questionmarks and commas.
Change-Id: If54d0896a2a3bf73260892e29fee2ea56b27e302
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/84355
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Hui Yingst <nigi@chromium.org>
diff --git a/fxbarcode/cbc_code128.cpp b/fxbarcode/cbc_code128.cpp
index 9f4f6da..2f337f9 100644
--- a/fxbarcode/cbc_code128.cpp
+++ b/fxbarcode/cbc_code128.cpp
@@ -37,11 +37,11 @@
if (!pWriter->CheckContentValidity(contents))
return false;
- BC_TYPE format = BC_CODE128;
+ BC_TYPE format = BC_TYPE::kCode128;
int32_t outWidth = 0;
int32_t outHeight = 0;
WideString content(contents);
- if (contents.GetLength() % 2 && pWriter->GetType() == BC_CODE128_C)
+ if (contents.GetLength() % 2 && pWriter->GetType() == BC_TYPE::kCode128C)
content += '0';
m_renderContents = pWriter->FilterContents(content.AsStringView());
@@ -59,7 +59,7 @@
}
BC_TYPE CBC_Code128::GetType() {
- return BC_CODE128;
+ return BC_TYPE::kCode128;
}
CBC_OnedCode128Writer* CBC_Code128::GetOnedCode128Writer() {