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/cbc_qrcode.cpp

Issue 1979723003: Make CFX_WideString(const CFX_WideString&) explicit. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Override Created 4 years, 7 months 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_pdf417i.cpp ('k') | xfa/fxbarcode/cbc_upca.cpp » ('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 8faf5ad2de90c3fee13061785799b601e50f7959..6f93b4415e0532cd0c65f7491e1779f6eb26435d 100644
--- a/xfa/fxbarcode/cbc_qrcode.cpp
+++ b/xfa/fxbarcode/cbc_qrcode.cpp
@@ -59,10 +59,11 @@ FX_BOOL CBC_QRCode::Encode(const CFX_WideStringC& contents,
int32_t& e) {
int32_t outWidth = 0;
int32_t outHeight = 0;
- uint8_t* data = ((CBC_QRCodeWriter*)m_pBCWriter)
- ->Encode(contents, ((CBC_QRCodeWriter*)m_pBCWriter)
- ->GetErrorCorrectionLevel(),
- outWidth, outHeight, e);
+ uint8_t* data =
+ ((CBC_QRCodeWriter*)m_pBCWriter)
+ ->Encode(CFX_WideString(contents),
+ ((CBC_QRCodeWriter*)m_pBCWriter)->GetErrorCorrectionLevel(),
+ outWidth, outHeight, e);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
((CBC_TwoDimWriter*)m_pBCWriter)->RenderResult(data, outWidth, outHeight, e);
FX_Free(data);
@@ -96,6 +97,6 @@ CFX_WideString CBC_QRCode::Decode(CFX_DIBitmap* pBitmap, int32_t& e) {
CBC_GlobalHistogramBinarizer binarizer(&source);
CBC_BinaryBitmap bitmap(&binarizer);
CFX_ByteString retStr = m_pBCReader->Decode(&bitmap, 0, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, FX_WSTRC(L""));
+ BC_EXCEPTION_CHECK_ReturnValue(e, CFX_WideString());
return CFX_WideString::FromUTF8(retStr.AsStringC());
}
« no previous file with comments | « xfa/fxbarcode/cbc_pdf417i.cpp ('k') | xfa/fxbarcode/cbc_upca.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698