diff options
author | thestig <thestig@chromium.org> | 2016-06-09 18:39:33 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-06-09 18:39:33 -0700 |
commit | 6dc1d7753691c0ff2f390e8ffd95a3182064487e (patch) | |
tree | 43d77664973a76c107832ae7b3c3e0f04bba1fe0 /xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp | |
parent | fcf61b39ee597c73e80ba789833fb7fe49878422 (diff) | |
download | pdfium-6dc1d7753691c0ff2f390e8ffd95a3182064487e.tar.xz |
Get rid of NULLs in xfa/fxbarcode/
Review-Url: https://codereview.chromium.org/2048983002
Diffstat (limited to 'xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp')
-rw-r--r-- | xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp b/xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp index 20b52774e8..933d009a73 100644 --- a/xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp +++ b/xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp @@ -82,7 +82,7 @@ uint8_t* CBC_OnedEAN13Writer::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_OnedEAN13Writer::Encode(const CFX_ByteString& contents, @@ -96,7 +96,7 @@ uint8_t* CBC_OnedEAN13Writer::Encode(const CFX_ByteString& contents, } 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_OnedEAN13Writer::Encode(const CFX_ByteString& contents, @@ -104,7 +104,7 @@ uint8_t* CBC_OnedEAN13Writer::Encode(const CFX_ByteString& contents, int32_t& e) { if (contents.GetLength() != 13) { e = BCExceptionDigitLengthShould13; - return NULL; + return nullptr; } m_iDataLenth = 13; int32_t firstDigit = FXSYS_atoi(contents.Mid(0, 1).c_str()); @@ -116,7 +116,7 @@ uint8_t* CBC_OnedEAN13Writer::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 = 1; i <= 6; i++) { @@ -128,13 +128,13 @@ uint8_t* CBC_OnedEAN13Writer::Encode(const CFX_ByteString& contents, 4, 0, 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 = 7; i <= 12; i++) { int32_t digit = FXSYS_atoi(contents.Mid(i, 1).c_str()); @@ -142,14 +142,14 @@ uint8_t* CBC_OnedEAN13Writer::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; } |