summaryrefslogtreecommitdiff
path: root/xfa/fxbarcode/common/BC_CommonByteArray.cpp
diff options
context:
space:
mode:
authorweili <weili@chromium.org>2016-08-09 13:45:03 -0700
committerCommit bot <commit-bot@chromium.org>2016-08-09 13:45:03 -0700
commite76203dbefd1df075a063ee019c3908513f6bee5 (patch)
tree2a763852e1d1de3eee6a67285ea96be2874bfb00 /xfa/fxbarcode/common/BC_CommonByteArray.cpp
parentad5ac7584844b03c5ceed082e5f5158a632405cc (diff)
downloadpdfium-e76203dbefd1df075a063ee019c3908513f6bee5.tar.xz
Use smart pointers for class owned pointers in xfa/fxbarcode
For classes under xfa/fxbarcode, use smart pointers instead of raw pointer to make memory management easier. Also fix some styling issues along the changes. BUG=pdfium:518 Review-Url: https://codereview.chromium.org/2221023003
Diffstat (limited to 'xfa/fxbarcode/common/BC_CommonByteArray.cpp')
-rw-r--r--xfa/fxbarcode/common/BC_CommonByteArray.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/xfa/fxbarcode/common/BC_CommonByteArray.cpp b/xfa/fxbarcode/common/BC_CommonByteArray.cpp
index be48d51b5b..afa8ac6836 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) {