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

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

Issue 1927253002: Replace CFX_PtrArray with typesafe CFX_ArrayTemplate, Part 5 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Nits. 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 unified diff | Download patch
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 2009 ZXing authors 8 * Copyright 2009 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 delete resultMetadata; 106 delete resultMetadata;
107 return NULL; 107 return NULL;
108 } 108 }
109 } 109 }
110 if (result.GetLength() == 0) { 110 if (result.GetLength() == 0) {
111 e = BCExceptionFormatInstance; 111 e = BCExceptionFormatInstance;
112 delete resultMetadata; 112 delete resultMetadata;
113 return NULL; 113 return NULL;
114 } 114 }
115 CFX_ByteArray rawBytes; 115 CFX_ByteArray rawBytes;
116 CFX_PtrArray byteSegments;
117 CBC_CommonDecoderResult* tempCd = new CBC_CommonDecoderResult(); 116 CBC_CommonDecoderResult* tempCd = new CBC_CommonDecoderResult();
118 tempCd->Init(rawBytes, result, byteSegments, ecLevel, e); 117 tempCd->Init(rawBytes, result, ecLevel, e);
119 if (e != BCExceptionNO) { 118 if (e != BCExceptionNO) {
120 delete resultMetadata; 119 delete resultMetadata;
121 return NULL; 120 return NULL;
122 } 121 }
123 tempCd->setOther(resultMetadata); 122 tempCd->setOther(resultMetadata);
124 return tempCd; 123 return tempCd;
125 } 124 }
126 int32_t CBC_DecodedBitStreamPaser::decodeMacroBlock( 125 int32_t CBC_DecodedBitStreamPaser::decodeMacroBlock(
127 CFX_Int32Array& codewords, 126 CFX_Int32Array& codewords,
128 int32_t codeIndex, 127 int32_t codeIndex,
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 for (int32_t i = 0; i < count; i++) { 483 for (int32_t i = 0; i < count; i++) {
485 result = result * nineHundred + BigInteger(codewords[i]); 484 result = result * nineHundred + BigInteger(codewords[i]);
486 } 485 }
487 CFX_ByteString resultString(bigIntegerToString(result).c_str()); 486 CFX_ByteString resultString(bigIntegerToString(result).c_str());
488 if (resultString.GetAt(0) != '1') { 487 if (resultString.GetAt(0) != '1') {
489 e = BCExceptionFormatInstance; 488 e = BCExceptionFormatInstance;
490 return ' '; 489 return ' ';
491 } 490 }
492 return resultString.Mid(1, resultString.GetLength() - 1); 491 return resultString.Mid(1, resultString.GetLength() - 1);
493 } 492 }
OLDNEW
« no previous file with comments | « xfa/fxbarcode/common/BC_CommonDecoderResult.cpp ('k') | xfa/fxbarcode/qrcode/BC_FinderPatternInfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698