From abc83aa862050642a90ed109074a9cf1018fee9b Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Mon, 22 May 2017 18:47:12 -0700 Subject: Clean up CBC_SymbolInfo. - 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 Commit-Queue: Lei Zhang --- fxbarcode/datamatrix/BC_C40Encoder.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fxbarcode/datamatrix/BC_C40Encoder.cpp') diff --git a/fxbarcode/datamatrix/BC_C40Encoder.cpp b/fxbarcode/datamatrix/BC_C40Encoder.cpp index a264482305..11d477c07d 100644 --- a/fxbarcode/datamatrix/BC_C40Encoder.cpp +++ b/fxbarcode/datamatrix/BC_C40Encoder.cpp @@ -65,7 +65,7 @@ void CBC_C40Encoder::Encode(CBC_EncoderContext& context, int32_t& e) { if (e != BCExceptionNO) { return; } - int32_t available = context.m_symbolInfo->m_dataCapacity - curCodewordCount; + int32_t available = context.m_symbolInfo->dataCapacity() - curCodewordCount; if (!context.hasMoreCharacters()) { if ((buffer.GetLength() % 3) == 2) { if (available < 2 || available > 2) { @@ -113,7 +113,7 @@ void CBC_C40Encoder::handleEOD(CBC_EncoderContext& context, if (e != BCExceptionNO) { return; } - int32_t available = context.m_symbolInfo->m_dataCapacity - curCodewordCount; + int32_t available = context.m_symbolInfo->dataCapacity() - curCodewordCount; if (rest == 2) { buffer += (wchar_t)'\0'; while (buffer.GetLength() >= 3) { -- cgit v1.2.3