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

Side by Side Diff: xfa/fxbarcode/oned/BC_OnedCode128Writer.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 unified diff | Download patch
« no previous file with comments | « xfa/fgas/font/fgas_stdfontmgr.cpp ('k') | xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 // Original code is licensed as follows: 6 // Original code is licensed as follows:
7 /* 7 /*
8 * Copyright 2010 ZXing authors 8 * Copyright 2010 ZXing authors
9 * 9 *
10 * Licensed under the Apache License, Version 2.0 (the "License"); 10 * Licensed under the Apache License, Version 2.0 (the "License");
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 int32_t position = 0; 204 int32_t position = 0;
205 patterns.Add((int32_t*)CBC_OnedCode128Reader::CODE_PATTERNS[CODE_START_C]); 205 patterns.Add((int32_t*)CBC_OnedCode128Reader::CODE_PATTERNS[CODE_START_C]);
206 checkSum += CODE_START_C * checkWeight; 206 checkSum += CODE_START_C * checkWeight;
207 while (position < contents.GetLength()) { 207 while (position < contents.GetLength()) {
208 int32_t patternIndex = 0; 208 int32_t patternIndex = 0;
209 FX_CHAR ch = contents.GetAt(position); 209 FX_CHAR ch = contents.GetAt(position);
210 if (ch < '0' || ch > '9') { 210 if (ch < '0' || ch > '9') {
211 patternIndex = (int32_t)ch; 211 patternIndex = (int32_t)ch;
212 position++; 212 position++;
213 } else { 213 } else {
214 patternIndex = FXSYS_atoi(contents.Mid(position, 2)); 214 patternIndex = FXSYS_atoi(contents.Mid(position, 2).c_str());
215 if (contents.GetAt(position + 1) < '0' || 215 if (contents.GetAt(position + 1) < '0' ||
216 contents.GetAt(position + 1) > '9') { 216 contents.GetAt(position + 1) > '9') {
217 position += 1; 217 position += 1;
218 } else { 218 } else {
219 position += 2; 219 position += 2;
220 } 220 }
221 } 221 }
222 patterns.Add((int32_t*)CBC_OnedCode128Reader::CODE_PATTERNS[patternIndex]); 222 patterns.Add((int32_t*)CBC_OnedCode128Reader::CODE_PATTERNS[patternIndex]);
223 checkSum += patternIndex * checkWeight; 223 checkSum += patternIndex * checkWeight;
224 if (position != 0) { 224 if (position != 0) {
225 checkWeight++; 225 checkWeight++;
226 } 226 }
227 } 227 }
228 return checkSum; 228 return checkSum;
229 } 229 }
OLDNEW
« no previous file with comments | « xfa/fgas/font/fgas_stdfontmgr.cpp ('k') | xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698