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

Unified Diff: xfa/fde/cfde_txtedtbuf.cpp

Issue 2208423002: Use smart pointers for class owned pointers under xfa/fde (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: one more change 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/fde/cfde_txtedtbuf.h ('k') | xfa/fde/cfde_txtedtengine.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fde/cfde_txtedtbuf.cpp
diff --git a/xfa/fde/cfde_txtedtbuf.cpp b/xfa/fde/cfde_txtedtbuf.cpp
index 7af5a1892be36413d2bd38638e4432c0b3ba55d3..58f1822661ef2bc3de8e7e554d47f4637100a450 100644
--- a/xfa/fde/cfde_txtedtbuf.cpp
+++ b/xfa/fde/cfde_txtedtbuf.cpp
@@ -16,17 +16,12 @@ const int kDefaultChunkCount = 2;
} // namespace
CFDE_TxtEdtBuf::CFDE_TxtEdtBuf()
- : m_nChunkSize(kDefaultChunkSize),
- m_nTotal(0),
- m_bChanged(FALSE),
- m_pAllocator(nullptr) {
- ASSERT(m_nChunkSize);
+ : m_nChunkSize(kDefaultChunkSize), m_nTotal(0), m_bChanged(FALSE) {
ResetChunkBuffer(kDefaultChunkCount, m_nChunkSize);
}
CFDE_TxtEdtBuf::~CFDE_TxtEdtBuf() {
Clear(TRUE);
- delete m_pAllocator;
m_Chunks.RemoveAll();
}
@@ -271,8 +266,6 @@ void CFDE_TxtEdtBuf::ResetChunkBuffer(int32_t nDefChunkCount,
int32_t nChunkSize) {
ASSERT(nChunkSize);
ASSERT(nDefChunkCount);
- delete m_pAllocator;
- m_pAllocator = nullptr;
m_Chunks.RemoveAll();
m_nChunkSize = nChunkSize;
int32_t nChunkLength =
« no previous file with comments | « xfa/fde/cfde_txtedtbuf.h ('k') | xfa/fde/cfde_txtedtengine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698