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

Unified Diff: xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp

Issue 1885973002: Remove implicit cast from CFX_ByteString to (const char*). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Typo Created 4 years, 8 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/oned/BC_OnedCode128Writer.cpp ('k') | xfa/fxbarcode/oned/BC_OnedEAN8Writer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp
diff --git a/xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp b/xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp
index b534602fb3d58eca77472d4bc1d0925d453768a3..bdc5e1f2c720d3b117c838e49ed00bc79edbd595 100644
--- a/xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp
+++ b/xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp
@@ -66,9 +66,9 @@ int32_t CBC_OnedEAN13Writer::CalcChecksum(const CFX_ByteString& contents) {
int32_t j = 1;
for (int32_t i = contents.GetLength() - 1; i >= 0; i--) {
if (j % 2) {
- odd += FXSYS_atoi(contents.Mid(i, 1));
+ odd += FXSYS_atoi(contents.Mid(i, 1).c_str());
} else {
- even += FXSYS_atoi(contents.Mid(i, 1));
+ even += FXSYS_atoi(contents.Mid(i, 1).c_str());
}
j++;
}
@@ -107,7 +107,7 @@ uint8_t* CBC_OnedEAN13Writer::Encode(const CFX_ByteString& contents,
return NULL;
}
m_iDataLenth = 13;
- int32_t firstDigit = FXSYS_atoi(contents.Mid(0, 1));
+ int32_t firstDigit = FXSYS_atoi(contents.Mid(0, 1).c_str());
int32_t parities = CBC_OnedEAN13Reader::FIRST_DIGIT_ENCODINGS[firstDigit];
outLength = m_codeWidth;
uint8_t* result = FX_Alloc(uint8_t, m_codeWidth);
@@ -120,7 +120,7 @@ uint8_t* CBC_OnedEAN13Writer::Encode(const CFX_ByteString& contents,
}
int32_t i = 0;
for (i = 1; i <= 6; i++) {
- int32_t digit = FXSYS_atoi(contents.Mid(i, 1));
+ int32_t digit = FXSYS_atoi(contents.Mid(i, 1).c_str());
if ((parities >> (6 - i) & 1) == 1) {
digit += 10;
}
@@ -137,7 +137,7 @@ uint8_t* CBC_OnedEAN13Writer::Encode(const CFX_ByteString& contents,
return NULL;
}
for (i = 7; i <= 12; i++) {
- int32_t digit = FXSYS_atoi(contents.Mid(i, 1));
+ int32_t digit = FXSYS_atoi(contents.Mid(i, 1).c_str());
pos += AppendPattern(result, pos, CBC_OneDimReader::L_PATTERNS[digit], 4, 1,
e);
if (e != BCExceptionNO) {
« no previous file with comments | « xfa/fxbarcode/oned/BC_OnedCode128Writer.cpp ('k') | xfa/fxbarcode/oned/BC_OnedEAN8Writer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698