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

Unified Diff: xfa/fxbarcode/common/BC_CommonByteArray.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/common/BC_CommonBitMatrix.cpp ('k') | xfa/fxbarcode/common/BC_CommonByteMatrix.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxbarcode/common/BC_CommonByteArray.cpp
diff --git a/xfa/fxbarcode/common/BC_CommonByteArray.cpp b/xfa/fxbarcode/common/BC_CommonByteArray.cpp
index 1fd6e464209f6adcd06ab377a29cd8827d005bc3..be48d51b5bb0a964bde7a3462d1c00fd75624973 100644
--- a/xfa/fxbarcode/common/BC_CommonByteArray.cpp
+++ b/xfa/fxbarcode/common/BC_CommonByteArray.cpp
@@ -25,7 +25,7 @@
#include "xfa/fxbarcode/common/BC_CommonByteArray.h"
CBC_CommonByteArray::CBC_CommonByteArray() {
- m_bytes = NULL;
+ m_bytes = nullptr;
m_size = 0;
m_index = 0;
}
@@ -65,7 +65,7 @@ void CBC_CommonByteArray::AppendByte(int32_t value) {
m_index++;
}
void CBC_CommonByteArray::Reserve(int32_t capacity) {
- if (m_bytes == NULL || m_size < capacity) {
+ if (!m_bytes || m_size < capacity) {
uint8_t* newArray = FX_Alloc(uint8_t, capacity);
if (m_bytes) {
FXSYS_memcpy(newArray, m_bytes, m_size);
« no previous file with comments | « xfa/fxbarcode/common/BC_CommonBitMatrix.cpp ('k') | xfa/fxbarcode/common/BC_CommonByteMatrix.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698