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

Unified Diff: xfa/fxbarcode/common/BC_CommonByteArray.cpp

Issue 2221023003: Use smart pointers for class owned pointers in xfa/fxbarcode (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: address comments Created 4 years, 4 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_CommonByteArray.h ('k') | xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256.h » ('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 be48d51b5bb0a964bde7a3462d1c00fd75624973..afa8ac6836d2d2a2ad08a1f51694eec6ac47f88a 100644
--- a/xfa/fxbarcode/common/BC_CommonByteArray.cpp
+++ b/xfa/fxbarcode/common/BC_CommonByteArray.cpp
@@ -44,16 +44,16 @@ CBC_CommonByteArray::CBC_CommonByteArray(uint8_t* byteArray, int32_t size) {
CBC_CommonByteArray::~CBC_CommonByteArray() {
FX_Free(m_bytes);
}
-int32_t CBC_CommonByteArray::At(int32_t index) {
+int32_t CBC_CommonByteArray::At(int32_t index) const {
return m_bytes[index] & 0xff;
}
void CBC_CommonByteArray::Set(int32_t index, int32_t value) {
m_bytes[index] = (uint8_t)value;
}
-int32_t CBC_CommonByteArray::Size() {
+int32_t CBC_CommonByteArray::Size() const {
return m_size;
}
-FX_BOOL CBC_CommonByteArray::IsEmpty() {
+FX_BOOL CBC_CommonByteArray::IsEmpty() const {
return m_size == 0;
}
void CBC_CommonByteArray::AppendByte(int32_t value) {
« no previous file with comments | « xfa/fxbarcode/common/BC_CommonByteArray.h ('k') | xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698