diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-07-30 22:07:22 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-07-30 22:07:22 +0000 |
commit | b53ef1e52d40f586c401a7e3948259f8ebbfd3cc (patch) | |
tree | 23a55140c7bee634f40ff30f8370c0aaa32002de /xfa/fxfa/parser/cxfa_layoutitem.h | |
parent | 87c1fdcc9a5669e29c4440e2b220587de7134e7a (diff) | |
download | pdfium-b53ef1e52d40f586c401a7e3948259f8ebbfd3cc.tar.xz |
Replace m_bIsContentLayoutItem with proper enum for type.
Because bools are bogus.
Change-Id: I54a2627443784cec40912288230e657c63a35408
Reviewed-on: https://pdfium-review.googlesource.com/39190
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_layoutitem.h')
-rw-r--r-- | xfa/fxfa/parser/cxfa_layoutitem.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/xfa/fxfa/parser/cxfa_layoutitem.h b/xfa/fxfa/parser/cxfa_layoutitem.h index f5568df575..c9b285935e 100644 --- a/xfa/fxfa/parser/cxfa_layoutitem.h +++ b/xfa/fxfa/parser/cxfa_layoutitem.h @@ -18,8 +18,8 @@ class CXFA_LayoutItem { public: virtual ~CXFA_LayoutItem(); - bool IsContainerLayoutItem() const { return !m_bIsContentLayoutItem; } - bool IsContentLayoutItem() const { return m_bIsContentLayoutItem; } + bool IsContainerLayoutItem() const { return m_ItemType == kContainerItem; } + bool IsContentLayoutItem() const { return m_ItemType == kContentItem; } CXFA_ContainerLayoutItem* AsContainerLayoutItem(); CXFA_ContentLayoutItem* AsContentLayoutItem(); @@ -28,7 +28,6 @@ class CXFA_LayoutItem { CXFA_Node* GetFormNode() const { return m_pFormNode.Get(); } void SetFormNode(CXFA_Node* pNode) { m_pFormNode = pNode; } - void AddChild(CXFA_LayoutItem* pChildItem); void AddHeadChild(CXFA_LayoutItem* pChildItem); void RemoveChild(CXFA_LayoutItem* pChildItem); @@ -39,9 +38,10 @@ class CXFA_LayoutItem { CXFA_LayoutItem* m_pFirstChild = nullptr; // Raw, intra-tree pointer. protected: - CXFA_LayoutItem(CXFA_Node* pNode, bool bIsContentLayoutItem); + enum ItemType { kContainerItem, kContentItem }; + CXFA_LayoutItem(CXFA_Node* pNode, ItemType type); - bool m_bIsContentLayoutItem; + const ItemType m_ItemType; UnownedPtr<CXFA_Node> m_pFormNode; }; |