summaryrefslogtreecommitdiff
path: root/fxbarcode/oned/BC_OnedCode39Writer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fxbarcode/oned/BC_OnedCode39Writer.cpp')
-rw-r--r--fxbarcode/oned/BC_OnedCode39Writer.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/fxbarcode/oned/BC_OnedCode39Writer.cpp b/fxbarcode/oned/BC_OnedCode39Writer.cpp
index 2e02e01583..8adef14765 100644
--- a/fxbarcode/oned/BC_OnedCode39Writer.cpp
+++ b/fxbarcode/oned/BC_OnedCode39Writer.cpp
@@ -49,7 +49,7 @@ CBC_OnedCode39Writer::~CBC_OnedCode39Writer() {}
bool CBC_OnedCode39Writer::CheckContentValidity(
const WideStringView& contents) {
- for (FX_STRSIZE i = 0; i < contents.GetLength(); i++) {
+ for (size_t i = 0; i < contents.GetLength(); i++) {
wchar_t ch = contents[i];
if ((ch >= L'0' && ch <= L'9') || (ch >= L'A' && ch <= L'Z') ||
ch == L'-' || ch == L'.' || ch == L' ' || ch == L'*' || ch == L'$' ||
@@ -64,7 +64,7 @@ bool CBC_OnedCode39Writer::CheckContentValidity(
WideString CBC_OnedCode39Writer::FilterContents(
const WideStringView& contents) {
WideString filtercontents;
- for (FX_STRSIZE i = 0; i < contents.GetLength(); i++) {
+ for (size_t i = 0; i < contents.GetLength(); i++) {
wchar_t ch = contents[i];
if (ch == L'*' && (i == 0 || i == contents.GetLength() - 1)) {
continue;
@@ -87,7 +87,7 @@ WideString CBC_OnedCode39Writer::FilterContents(
WideString CBC_OnedCode39Writer::RenderTextContents(
const WideStringView& contents) {
WideString renderContents;
- for (FX_STRSIZE i = 0; i < contents.GetLength(); i++) {
+ for (size_t i = 0; i < contents.GetLength(); i++) {
wchar_t ch = contents[i];
if (ch == L'*' && (i == 0 || i == contents.GetLength() - 1)) {
continue;
@@ -138,8 +138,7 @@ void CBC_OnedCode39Writer::ToIntArray(int32_t a, int8_t* toReturn) {
}
char CBC_OnedCode39Writer::CalcCheckSum(const ByteString& contents) {
- FX_STRSIZE length = contents.GetLength();
- if (length > 80)
+ if (contents.GetLength() > 80)
return '*';
int32_t checksum = 0;
@@ -176,7 +175,7 @@ uint8_t* CBC_OnedCode39Writer::EncodeImpl(const ByteString& contents,
int32_t codeWidth = (wideStrideNum * m_iWideNarrRatio + narrStrideNum) * 2 +
1 + m_iContentLen;
size_t len = strlen(ALPHABET_STRING);
- for (FX_STRSIZE j = 0; j < m_iContentLen; j++) {
+ for (size_t j = 0; j < m_iContentLen; j++) {
for (size_t i = 0; i < len; i++) {
if (ALPHABET_STRING[i] != encodedContents[j])
continue;