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

Unified Diff: fpdfsdk/src/fxedit/fxet_edit.cpp

Issue 1098043002: Remove Release() from IFX_Edit_UndoItem. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Unused CFFL_Edit_UndoItem Created 5 years, 8 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
Index: fpdfsdk/src/fxedit/fxet_edit.cpp
diff --git a/fpdfsdk/src/fxedit/fxet_edit.cpp b/fpdfsdk/src/fxedit/fxet_edit.cpp
index 2d25ba3383b8c5be2abb458431149091005ff0c4..c7f7ce5b0433db3a1d64553f2a7a270ad5a91cd5 100644
--- a/fpdfsdk/src/fxedit/fxet_edit.cpp
+++ b/fpdfsdk/src/fxedit/fxet_edit.cpp
@@ -453,10 +453,7 @@ void CFX_Edit_Undo::RemoveHeads()
{
ASSERT(m_UndoItemStack.GetSize() > 1);
- IFX_Edit_UndoItem* pItem = m_UndoItemStack.GetAt(0);
- ASSERT(pItem != NULL);
-
- pItem->Release();
+ delete m_UndoItemStack.GetAt(0);
m_UndoItemStack.RemoveAt(0);
}
@@ -464,10 +461,7 @@ void CFX_Edit_Undo::RemoveTails()
{
for (FX_INT32 i = m_UndoItemStack.GetSize()-1; i >= m_nCurUndoPos; i--)
{
- IFX_Edit_UndoItem* pItem = m_UndoItemStack.GetAt(i);
- ASSERT(pItem != NULL);
-
- pItem->Release();
+ delete m_UndoItemStack.GetAt(i);
m_UndoItemStack.RemoveAt(i);
}
}
@@ -476,10 +470,7 @@ void CFX_Edit_Undo::Reset()
{
for (FX_INT32 i=0, sz=m_UndoItemStack.GetSize(); i < sz; i++)
{
- IFX_Edit_UndoItem * pItem = m_UndoItemStack.GetAt(i);
- ASSERT(pItem != NULL);
-
- pItem->Release();
+ delete m_UndoItemStack.GetAt(i);
}
m_nCurUndoPos = 0;
m_UndoItemStack.RemoveAll();
@@ -495,10 +486,7 @@ CFX_Edit_GroupUndoItem::~CFX_Edit_GroupUndoItem()
{
for (int i=0,sz=m_Items.GetSize(); i<sz; i++)
{
- CFX_Edit_UndoItem* pUndoItem = m_Items[i];
- ASSERT(pUndoItem != NULL);
-
- pUndoItem->Release();
+ delete m_Items[i];
}
m_Items.RemoveAll();
@@ -558,11 +546,6 @@ CFX_WideString CFX_Edit_GroupUndoItem::GetUndoTitle()
return m_sTitle;
}
-void CFX_Edit_GroupUndoItem::Release()
-{
- delete this;
-}
-
/* ------------------------------------- CFX_Edit_UndoItem derived classes ------------------------------------- */
CFXEU_InsertWord::CFXEU_InsertWord(CFX_Edit * pEdit, const CPVT_WordPlace & wpOldPlace, const CPVT_WordPlace & wpNewPlace,
« fpdfsdk/include/fxedit/fx_edit.h ('K') | « fpdfsdk/src/formfiller/FFL_TextField.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698