Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(554)

Unified Diff: xfa/fxbarcode/oned/BC_OnedEAN8Writer.cpp

Issue 2048983002: Get rid of NULLs in xfa/fxbarcode/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: nits Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp ('k') | xfa/fxbarcode/oned/BC_OnedUPCAReader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxbarcode/oned/BC_OnedEAN8Writer.cpp
diff --git a/xfa/fxbarcode/oned/BC_OnedEAN8Writer.cpp b/xfa/fxbarcode/oned/BC_OnedEAN8Writer.cpp
index 2aa57d18d1b29ad9deb460fc717de02b7a7c0ac4..f4a4dc86e11c6a4a71ea2b71dea505408636fd42 100644
--- a/xfa/fxbarcode/oned/BC_OnedEAN8Writer.cpp
+++ b/xfa/fxbarcode/oned/BC_OnedEAN8Writer.cpp
@@ -92,7 +92,7 @@ uint8_t* CBC_OnedEAN8Writer::Encode(const CFX_ByteString& contents,
int32_t& outHeight,
int32_t& e) {
uint8_t* ret = Encode(contents, format, outWidth, outHeight, 0, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
+ BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
return ret;
}
uint8_t* CBC_OnedEAN8Writer::Encode(const CFX_ByteString& contents,
@@ -103,11 +103,11 @@ uint8_t* CBC_OnedEAN8Writer::Encode(const CFX_ByteString& contents,
int32_t& e) {
if (format != BCFORMAT_EAN_8) {
e = BCExceptionOnlyEncodeEAN_8;
- return NULL;
+ return nullptr;
}
uint8_t* ret =
CBC_OneDimWriter::Encode(contents, format, outWidth, outHeight, hints, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
+ BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
return ret;
}
uint8_t* CBC_OnedEAN8Writer::Encode(const CFX_ByteString& contents,
@@ -115,7 +115,7 @@ uint8_t* CBC_OnedEAN8Writer::Encode(const CFX_ByteString& contents,
int32_t& e) {
if (contents.GetLength() != 8) {
e = BCExceptionDigitLengthMustBe8;
- return NULL;
+ return nullptr;
}
outLength = m_codeWidth;
uint8_t* result = FX_Alloc(uint8_t, m_codeWidth);
@@ -124,7 +124,7 @@ uint8_t* CBC_OnedEAN8Writer::Encode(const CFX_ByteString& contents,
AppendPattern(result, pos, CBC_OneDimReader::START_END_PATTERN, 3, 1, e);
if (e != BCExceptionNO) {
FX_Free(result);
- return NULL;
+ return nullptr;
}
int32_t i = 0;
for (i = 0; i <= 3; i++) {
@@ -133,13 +133,13 @@ uint8_t* CBC_OnedEAN8Writer::Encode(const CFX_ByteString& contents,
e);
if (e != BCExceptionNO) {
FX_Free(result);
- return NULL;
+ return nullptr;
}
}
pos += AppendPattern(result, pos, CBC_OneDimReader::MIDDLE_PATTERN, 5, 0, e);
if (e != BCExceptionNO) {
FX_Free(result);
- return NULL;
+ return nullptr;
}
for (i = 4; i <= 7; i++) {
int32_t digit = FXSYS_atoi(contents.Mid(i, 1).c_str());
@@ -147,14 +147,14 @@ uint8_t* CBC_OnedEAN8Writer::Encode(const CFX_ByteString& contents,
e);
if (e != BCExceptionNO) {
FX_Free(result);
- return NULL;
+ return nullptr;
}
}
pos +=
AppendPattern(result, pos, CBC_OneDimReader::START_END_PATTERN, 3, 1, e);
if (e != BCExceptionNO) {
FX_Free(result);
- return NULL;
+ return nullptr;
}
return result;
}
« no previous file with comments | « xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp ('k') | xfa/fxbarcode/oned/BC_OnedUPCAReader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698