OLD | NEW |
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 2012 ZXing authors | 8 * Copyright 2012 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 delete errorLocations; | 87 delete errorLocations; |
88 for (int32_t i = 0; i < sigmaOmega->GetSize(); i++) { | 88 for (int32_t i = 0; i < sigmaOmega->GetSize(); i++) { |
89 delete (CBC_PDF417ECModulusPoly*)sigmaOmega->GetAt(i); | 89 delete (CBC_PDF417ECModulusPoly*)sigmaOmega->GetAt(i); |
90 } | 90 } |
91 sigmaOmega->RemoveAll(); | 91 sigmaOmega->RemoveAll(); |
92 delete sigmaOmega; | 92 delete sigmaOmega; |
93 return -1; | 93 return -1; |
94 } | 94 } |
95 for (int32_t i = 0; i < errorLocations->GetSize(); i++) { | 95 for (int32_t i = 0; i < errorLocations->GetSize(); i++) { |
96 int32_t log = m_field->log(errorLocations->GetAt(i), e); | 96 int32_t log = m_field->log(errorLocations->GetAt(i), e); |
97 ; | 97 |
98 BC_EXCEPTION_CHECK_ReturnValue(e, -1); | 98 BC_EXCEPTION_CHECK_ReturnValue(e, -1); |
99 int32_t position = received.GetSize() - 1 - log; | 99 int32_t position = received.GetSize() - 1 - log; |
100 if (position < 0) { | 100 if (position < 0) { |
101 e = BCExceptionChecksumException; | 101 e = BCExceptionChecksumException; |
102 delete errorLocations; | 102 delete errorLocations; |
103 delete errorMagnitudes; | 103 delete errorMagnitudes; |
104 for (int32_t j = 0; j < sigmaOmega->GetSize(); j++) { | 104 for (int32_t j = 0; j < sigmaOmega->GetSize(); j++) { |
105 delete (CBC_PDF417ECModulusPoly*)sigmaOmega->GetAt(j); | 105 delete (CBC_PDF417ECModulusPoly*)sigmaOmega->GetAt(j); |
106 } | 106 } |
107 sigmaOmega->RemoveAll(); | 107 sigmaOmega->RemoveAll(); |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 int32_t denominator = | 378 int32_t denominator = |
379 m_field->inverse(formalDerivative.evaluateAt(xiInverse), e); | 379 m_field->inverse(formalDerivative.evaluateAt(xiInverse), e); |
380 if (e != BCExceptionNO) { | 380 if (e != BCExceptionNO) { |
381 delete result; | 381 delete result; |
382 return NULL; | 382 return NULL; |
383 } | 383 } |
384 result->SetAt(i, m_field->multiply(numerator, denominator)); | 384 result->SetAt(i, m_field->multiply(numerator, denominator)); |
385 } | 385 } |
386 return result; | 386 return result; |
387 } | 387 } |
OLD | NEW |