| 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 2007 ZXing authors | 8 * Copyright 2007 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 CFX_ByteString bs = Decode(&bitmap, hints, e); | 86 CFX_ByteString bs = Decode(&bitmap, hints, e); |
| 87 BC_EXCEPTION_CHECK_ReturnValue(e, ""); | 87 BC_EXCEPTION_CHECK_ReturnValue(e, ""); |
| 88 return bs; | 88 return bs; |
| 89 } | 89 } |
| 90 CFX_ByteString CBC_QRCodeReader::Decode(CBC_BinaryBitmap* image, int32_t& e) { | 90 CFX_ByteString CBC_QRCodeReader::Decode(CBC_BinaryBitmap* image, int32_t& e) { |
| 91 CFX_ByteString bs = Decode(image, 0, e); | 91 CFX_ByteString bs = Decode(image, 0, e); |
| 92 BC_EXCEPTION_CHECK_ReturnValue(e, ""); | 92 BC_EXCEPTION_CHECK_ReturnValue(e, ""); |
| 93 return bs; | 93 return bs; |
| 94 } | 94 } |
| 95 void CBC_QRCodeReader::ReleaseAll() { | 95 void CBC_QRCodeReader::ReleaseAll() { |
| 96 if (CBC_ReedSolomonGF256::QRCodeFild) { | 96 delete CBC_ReedSolomonGF256::QRCodeFild; |
| 97 delete CBC_ReedSolomonGF256::QRCodeFild; | 97 CBC_ReedSolomonGF256::QRCodeFild = nullptr; |
| 98 CBC_ReedSolomonGF256::QRCodeFild = NULL; | 98 delete CBC_ReedSolomonGF256::DataMatrixField; |
| 99 } | 99 CBC_ReedSolomonGF256::DataMatrixField = nullptr; |
| 100 if (CBC_ReedSolomonGF256::DataMatrixField) { | |
| 101 delete CBC_ReedSolomonGF256::DataMatrixField; | |
| 102 CBC_ReedSolomonGF256::DataMatrixField = NULL; | |
| 103 } | |
| 104 CBC_QRCoderMode::Destroy(); | 100 CBC_QRCoderMode::Destroy(); |
| 105 CBC_QRCoderErrorCorrectionLevel::Destroy(); | 101 CBC_QRCoderErrorCorrectionLevel::Destroy(); |
| 106 CBC_QRDataMask::Destroy(); | 102 CBC_QRDataMask::Destroy(); |
| 107 CBC_QRCoderVersion::Destroy(); | 103 CBC_QRCoderVersion::Destroy(); |
| 108 } | 104 } |
| OLD | NEW |