diff options
author | Lei Zhang <thestig@chromium.org> | 2017-05-22 18:47:12 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-05-23 21:17:23 +0000 |
commit | abc83aa862050642a90ed109074a9cf1018fee9b (patch) | |
tree | b842d471c3cc49a0268a0647ca4c574248610ae9 /fxbarcode/datamatrix/BC_ErrorCorrection.cpp | |
parent | e0f1310795f1cf886b9b2a134b28ace9e8fc25ba (diff) | |
download | pdfium-abc83aa862050642a90ed109074a9cf1018fee9b.tar.xz |
Clean up CBC_SymbolInfo.chromium/3109
- Remove rectangular ctor param. It can be derived from dimensions.
- Make members private and add accessors.
- Remove exceptions that cannot occur.
Change-Id: Iec113205241562a0559e594fe257f5b9064ed97e
Reviewed-on: https://pdfium-review.googlesource.com/5737
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fxbarcode/datamatrix/BC_ErrorCorrection.cpp')
-rw-r--r-- | fxbarcode/datamatrix/BC_ErrorCorrection.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fxbarcode/datamatrix/BC_ErrorCorrection.cpp b/fxbarcode/datamatrix/BC_ErrorCorrection.cpp index cd2355b8fe..cc6d1b320b 100644 --- a/fxbarcode/datamatrix/BC_ErrorCorrection.cpp +++ b/fxbarcode/datamatrix/BC_ErrorCorrection.cpp @@ -123,7 +123,7 @@ CBC_ErrorCorrection::~CBC_ErrorCorrection() {} CFX_WideString CBC_ErrorCorrection::encodeECC200(CFX_WideString codewords, CBC_SymbolInfo* symbolInfo, int32_t& e) { - if (codewords.GetLength() != symbolInfo->m_dataCapacity) { + if (codewords.GetLength() != symbolInfo->dataCapacity()) { e = BCExceptionIllegalArgument; return CFX_WideString(); } @@ -132,7 +132,7 @@ CFX_WideString CBC_ErrorCorrection::encodeECC200(CFX_WideString codewords, int32_t blockCount = symbolInfo->getInterleavedBlockCount(); if (blockCount == 1) { CFX_WideString ecc = - createECCBlock(codewords, symbolInfo->m_errorCodewords, e); + createECCBlock(codewords, symbolInfo->errorCodewords(), e); if (e != BCExceptionNO) return CFX_WideString(); sb += ecc; @@ -150,7 +150,7 @@ CFX_WideString CBC_ErrorCorrection::encodeECC200(CFX_WideString codewords, } for (int32_t block = 0; block < blockCount; block++) { CFX_WideString temp; - for (int32_t d = block; d < symbolInfo->m_dataCapacity; d += blockCount) { + for (int32_t d = block; d < symbolInfo->dataCapacity(); d += blockCount) { temp += (wchar_t)codewords.GetAt(d); } CFX_WideString ecc = createECCBlock(temp, errorSizes[block], e); @@ -159,7 +159,7 @@ CFX_WideString CBC_ErrorCorrection::encodeECC200(CFX_WideString codewords, int32_t pos = 0; for (int32_t l = block; l < errorSizes[block] * blockCount; l += blockCount) { - sb.SetAt(symbolInfo->m_dataCapacity + l, ecc.GetAt(pos++)); + sb.SetAt(symbolInfo->dataCapacity() + l, ecc.GetAt(pos++)); } } } |