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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 } | 347 } |
348 | 348 |
349 CBC_QRCoderVersion::~CBC_QRCoderVersion() { | 349 CBC_QRCoderVersion::~CBC_QRCoderVersion() { |
350 for (int32_t i = 0; i < m_ecBlocksArray.GetSize(); ++i) | 350 for (int32_t i = 0; i < m_ecBlocksArray.GetSize(); ++i) |
351 delete m_ecBlocksArray[i]; | 351 delete m_ecBlocksArray[i]; |
352 } | 352 } |
353 | 353 |
354 int32_t CBC_QRCoderVersion::GetVersionNumber() { | 354 int32_t CBC_QRCoderVersion::GetVersionNumber() { |
355 return m_versionNumber; | 355 return m_versionNumber; |
356 } | 356 } |
357 CFX_Int32Array* CBC_QRCoderVersion::GetAlignmentPatternCenters() { | 357 CFX_ArrayTemplate<int32_t>* CBC_QRCoderVersion::GetAlignmentPatternCenters() { |
358 return &m_alignmentPatternCenters; | 358 return &m_alignmentPatternCenters; |
359 } | 359 } |
360 int32_t CBC_QRCoderVersion::GetTotalCodeWords() { | 360 int32_t CBC_QRCoderVersion::GetTotalCodeWords() { |
361 return m_totalCodeWords; | 361 return m_totalCodeWords; |
362 } | 362 } |
363 int32_t CBC_QRCoderVersion::GetDimensionForVersion() { | 363 int32_t CBC_QRCoderVersion::GetDimensionForVersion() { |
364 return 17 + 4 * m_versionNumber; | 364 return 17 + 4 * m_versionNumber; |
365 } | 365 } |
366 CBC_QRCoderECBlocks* CBC_QRCoderVersion::GetECBlocksForLevel( | 366 CBC_QRCoderECBlocks* CBC_QRCoderVersion::GetECBlocksForLevel( |
367 CBC_QRCoderErrorCorrectionLevel* ecLevel) { | 367 CBC_QRCoderErrorCorrectionLevel* ecLevel) { |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
774 BC_EXCEPTION_CHECK_ReturnValue(e, nullptr); | 774 BC_EXCEPTION_CHECK_ReturnValue(e, nullptr); |
775 } | 775 } |
776 return (*VERSION)[versionNumber - 1]; | 776 return (*VERSION)[versionNumber - 1]; |
777 } | 777 } |
778 | 778 |
779 void CBC_QRCoderVersion::Destroy() { | 779 void CBC_QRCoderVersion::Destroy() { |
780 for (int32_t i = 0; i < VERSION->GetSize(); i++) | 780 for (int32_t i = 0; i < VERSION->GetSize(); i++) |
781 delete (*VERSION)[i]; | 781 delete (*VERSION)[i]; |
782 VERSION->RemoveAll(); | 782 VERSION->RemoveAll(); |
783 } | 783 } |
OLD | NEW |