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

Side by Side Diff: xfa/fxbarcode/pdf417/BC_PDF417DetectionResultRowIndicatorColumn.cpp

Issue 1891953002: Avoid needless construction of CFX_ByteStrings during string building (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: 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 | « core/fpdfdoc/doc_utils.cpp ('k') | no next file » | 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 2013 ZXing authors 8 * Copyright 2013 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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 barcodeRowCountUpperPart.getValue()->GetAt(0), 215 barcodeRowCountUpperPart.getValue()->GetAt(0),
216 barcodeRowCountLowerPart.getValue()->GetAt(0), 216 barcodeRowCountLowerPart.getValue()->GetAt(0),
217 barcodeECLevel.getValue()->GetAt(0)); 217 barcodeECLevel.getValue()->GetAt(0));
218 removeIncorrectCodewords(codewords, *barcodeMetadata); 218 removeIncorrectCodewords(codewords, *barcodeMetadata);
219 return barcodeMetadata; 219 return barcodeMetadata;
220 } 220 }
221 FX_BOOL CBC_DetectionResultRowIndicatorColumn::isLeft() { 221 FX_BOOL CBC_DetectionResultRowIndicatorColumn::isLeft() {
222 return m_isLeft; 222 return m_isLeft;
223 } 223 }
224 CFX_ByteString CBC_DetectionResultRowIndicatorColumn::toString() { 224 CFX_ByteString CBC_DetectionResultRowIndicatorColumn::toString() {
225 return (CFX_ByteString) "IsLeft: " + (CFX_ByteString)m_isLeft + '\n' + 225 return CFX_ByteString("IsLeft: ") + m_isLeft + '\n' +
226 CBC_DetectionResultColumn::toString(); 226 CBC_DetectionResultColumn::toString();
227 } 227 }
228 void CBC_DetectionResultRowIndicatorColumn::removeIncorrectCodewords( 228 void CBC_DetectionResultRowIndicatorColumn::removeIncorrectCodewords(
229 CFX_PtrArray* codewords, 229 CFX_PtrArray* codewords,
230 CBC_BarcodeMetadata barcodeMetadata) { 230 CBC_BarcodeMetadata barcodeMetadata) {
231 for (int32_t codewordRow = 0; codewordRow < codewords->GetSize(); 231 for (int32_t codewordRow = 0; codewordRow < codewords->GetSize();
232 codewordRow++) { 232 codewordRow++) {
233 CBC_Codeword* codeword = (CBC_Codeword*)codewords->GetAt(codewordRow); 233 CBC_Codeword* codeword = (CBC_Codeword*)codewords->GetAt(codewordRow);
234 if (codeword == NULL) { 234 if (codeword == NULL) {
235 continue; 235 continue;
(...skipping 22 matching lines...) Expand all
258 } 258 }
259 break; 259 break;
260 case 2: 260 case 2:
261 if (rowIndicatorValue + 1 != barcodeMetadata.getColumnCount()) { 261 if (rowIndicatorValue + 1 != barcodeMetadata.getColumnCount()) {
262 codewords->SetAt(codewordRow, NULL); 262 codewords->SetAt(codewordRow, NULL);
263 } 263 }
264 break; 264 break;
265 } 265 }
266 } 266 }
267 } 267 }
OLDNEW
« no previous file with comments | « core/fpdfdoc/doc_utils.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698