diff options
author | Lei Zhang <thestig@chromium.org> | 2015-12-14 18:27:25 -0800 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-12-14 18:27:25 -0800 |
commit | 96660d6f382204339d6b1aadc3913303d436e252 (patch) | |
tree | b5f84756e1a89251831cebc05b9d4e1f6cb2027b /fpdfsdk/src/fxedit/fxet_edit.cpp | |
parent | d983b09c3ae29a97cba8e9ec9c6351545f6087ee (diff) | |
download | pdfium-96660d6f382204339d6b1aadc3913303d436e252.tar.xz |
Merge to XFA: Get rid of most instance of 'foo != NULL'
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1512763013 .
(cherry picked from commit e3c7c2b54348da4a6939f6672f6c6bff126815a7)
Review URL: https://codereview.chromium.org/1529553003 .
Diffstat (limited to 'fpdfsdk/src/fxedit/fxet_edit.cpp')
-rw-r--r-- | fpdfsdk/src/fxedit/fxet_edit.cpp | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/fpdfsdk/src/fxedit/fxet_edit.cpp b/fpdfsdk/src/fxedit/fxet_edit.cpp index cca0319eb5..573a5723bd 100644 --- a/fpdfsdk/src/fxedit/fxet_edit.cpp +++ b/fpdfsdk/src/fxedit/fxet_edit.cpp @@ -93,7 +93,7 @@ IFX_Edit* CFX_Edit_Iterator::GetEdit() const { CFX_Edit_Provider::CFX_Edit_Provider(IFX_Edit_FontMap* pFontMap) : m_pFontMap(pFontMap) { - ASSERT(m_pFontMap != NULL); + ASSERT(m_pFontMap); } CFX_Edit_Provider::~CFX_Edit_Provider() {} @@ -286,8 +286,6 @@ void CFX_Edit_Undo::Undo() { if (m_nCurUndoPos > 0) { IFX_Edit_UndoItem* pItem = m_UndoItemStack.GetAt(m_nCurUndoPos - 1); - ASSERT(pItem != NULL); - pItem->Undo(); m_nCurUndoPos--; @@ -308,8 +306,6 @@ void CFX_Edit_Undo::Redo() { if (m_nCurUndoPos < nStackSize) { IFX_Edit_UndoItem* pItem = m_UndoItemStack.GetAt(m_nCurUndoPos); - ASSERT(pItem != NULL); - pItem->Redo(); m_nCurUndoPos++; @@ -325,7 +321,7 @@ FX_BOOL CFX_Edit_Undo::IsWorking() const { void CFX_Edit_Undo::AddItem(IFX_Edit_UndoItem* pItem) { ASSERT(!m_bWorking); - ASSERT(pItem != NULL); + ASSERT(pItem); ASSERT(m_nBufSize > 1); if (m_nCurUndoPos < m_UndoItemStack.GetSize()) @@ -390,8 +386,6 @@ CFX_Edit_GroupUndoItem::~CFX_Edit_GroupUndoItem() { } void CFX_Edit_GroupUndoItem::AddUndoItem(CFX_Edit_UndoItem* pUndoItem) { - ASSERT(pUndoItem != NULL); - pUndoItem->SetFirst(FALSE); pUndoItem->SetLast(FALSE); @@ -404,11 +398,9 @@ void CFX_Edit_GroupUndoItem::AddUndoItem(CFX_Edit_UndoItem* pUndoItem) { void CFX_Edit_GroupUndoItem::UpdateItems() { if (m_Items.GetSize() > 0) { CFX_Edit_UndoItem* pFirstItem = m_Items[0]; - ASSERT(pFirstItem != NULL); pFirstItem->SetFirst(TRUE); CFX_Edit_UndoItem* pLastItem = m_Items[m_Items.GetSize() - 1]; - ASSERT(pLastItem != NULL); pLastItem->SetLast(TRUE); } } @@ -416,8 +408,6 @@ void CFX_Edit_GroupUndoItem::UpdateItems() { void CFX_Edit_GroupUndoItem::Undo() { for (int i = m_Items.GetSize() - 1; i >= 0; i--) { CFX_Edit_UndoItem* pUndoItem = m_Items[i]; - ASSERT(pUndoItem != NULL); - pUndoItem->Undo(); } } @@ -425,8 +415,6 @@ void CFX_Edit_GroupUndoItem::Undo() { void CFX_Edit_GroupUndoItem::Redo() { for (int i = 0, sz = m_Items.GetSize(); i < sz; i++) { CFX_Edit_UndoItem* pUndoItem = m_Items[i]; - ASSERT(pUndoItem != NULL); - pUndoItem->Redo(); } } @@ -818,7 +806,7 @@ CFX_Edit::CFX_Edit(IPDF_VariableText* pVT) m_bNotify(TRUE), m_bOprNotify(FALSE), m_pGroupUndoItem(NULL) { - ASSERT(pVT != NULL); + ASSERT(pVT); } CFX_Edit::~CFX_Edit() { @@ -3107,8 +3095,6 @@ void CFX_Edit::BeginGroupUndo(const CFX_WideString& sTitle) { } void CFX_Edit::EndGroupUndo() { - ASSERT(m_pGroupUndoItem != NULL); - m_pGroupUndoItem->UpdateItems(); m_Undo.AddItem(m_pGroupUndoItem); if (m_bOprNotify && m_pOprNotify) |