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

Unified Diff: xfa/fxfa/include/xfa_ffdocview.h

Issue 1976123003: Remove { delete this; } anti-pattern from IXFA_WidgetIterator (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Restore page Release(). Created 4 years, 7 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/fxfa/include/fxfa.h ('k') | xfa/fxfa/include/xfa_ffpageview.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/include/xfa_ffdocview.h
diff --git a/xfa/fxfa/include/xfa_ffdocview.h b/xfa/fxfa/include/xfa_ffdocview.h
index 7f1c631da39238c3940bb2741b96dbf20048d707..473b820defe4f390a503c7df9d1acb3d443a8a7a 100644
--- a/xfa/fxfa/include/xfa_ffdocview.h
+++ b/xfa/fxfa/include/xfa_ffdocview.h
@@ -125,20 +125,20 @@ class CXFA_FFDocView {
int32_t m_iLock;
friend class CXFA_FFNotify;
};
+
class CXFA_FFDocWidgetIterator : public IXFA_WidgetIterator {
public:
CXFA_FFDocWidgetIterator(CXFA_FFDocView* pDocView, CXFA_Node* pTravelRoot);
- virtual ~CXFA_FFDocWidgetIterator();
-
- virtual void Release() { delete this; }
-
- virtual void Reset();
- virtual CXFA_FFWidget* MoveToFirst();
- virtual CXFA_FFWidget* MoveToLast();
- virtual CXFA_FFWidget* MoveToNext();
- virtual CXFA_FFWidget* MoveToPrevious();
- virtual CXFA_FFWidget* GetCurrentWidget();
- virtual FX_BOOL SetCurrentWidget(CXFA_FFWidget* hWidget);
+ ~CXFA_FFDocWidgetIterator() override;
+
+ // IXFA_WidgetIterator:
+ void Reset() override;
+ CXFA_FFWidget* MoveToFirst() override;
+ CXFA_FFWidget* MoveToLast() override;
+ CXFA_FFWidget* MoveToNext() override;
+ CXFA_FFWidget* MoveToPrevious() override;
+ CXFA_FFWidget* GetCurrentWidget() override;
+ FX_BOOL SetCurrentWidget(CXFA_FFWidget* hWidget) override;
protected:
CXFA_ContainerIterator m_ContentIterator;
« no previous file with comments | « xfa/fxfa/include/fxfa.h ('k') | xfa/fxfa/include/xfa_ffpageview.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698