summaryrefslogtreecommitdiff
path: root/xfa/fxbarcode/cbc_qrcode.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-05-13 17:21:31 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-13 17:21:31 -0700
commitafe94306e3c542f0d499e7f7706ee5dec4028d8a (patch)
tree5012c9356cf1af259c74da3008dc7fcad439db2a /xfa/fxbarcode/cbc_qrcode.cpp
parent01e624fb699af3a8ee2f81620d59d366dac18f29 (diff)
downloadpdfium-afe94306e3c542f0d499e7f7706ee5dec4028d8a.tar.xz
Make CFX_WideString(const CFX_WideString&) explicit.
BUG= Review-Url: https://codereview.chromium.org/1979723003
Diffstat (limited to 'xfa/fxbarcode/cbc_qrcode.cpp')
-rw-r--r--xfa/fxbarcode/cbc_qrcode.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/xfa/fxbarcode/cbc_qrcode.cpp b/xfa/fxbarcode/cbc_qrcode.cpp
index 8faf5ad2de..6f93b4415e 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());
}