From 88cb0a32586cae4d00654c679dbb41fa0133c3e5 Mon Sep 17 00:00:00 2001 From: dsinclair Date: Mon, 21 Nov 2016 06:54:54 -0800 Subject: Remove unread m_InfoStart from IFWL_Form. The m_InfoStart variable has values set but never read. Removed. Review-Url: https://codereview.chromium.org/2513673002 --- xfa/fwl/core/ifwl_form.cpp | 15 ++++----------- xfa/fwl/core/ifwl_form.h | 9 --------- 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/xfa/fwl/core/ifwl_form.cpp b/xfa/fwl/core/ifwl_form.cpp index 22c188ab7a..83fba1fd04 100644 --- a/xfa/fwl/core/ifwl_form.cpp +++ b/xfa/fwl/core/ifwl_form.cpp @@ -34,10 +34,6 @@ const uint8_t kCornerEnlarge = 10; } // namespace -RestoreInfo::RestoreInfo() {} - -RestoreInfo::~RestoreInfo() {} - IFWL_Form::IFWL_Form(const IFWL_App* app, std::unique_ptr properties, IFWL_Widget* pOuter) @@ -738,14 +734,11 @@ void IFWL_Form::OnLButtonDown(CFWL_MsgMouse* pMsg) { m_rtCaption.width - kSystemButtonSize * m_iSysBox - 2 * m_fCYBorder, m_rtCaption.height - m_fCXBorder); - if (pPressBtn) { - pPressBtn->SetPressed(); - Repaint(&pPressBtn->m_rtBtn); - } + if (!pPressBtn) + return; - m_InfoStart.m_ptStart = CFX_PointF(pMsg->m_fx, pMsg->m_fy); - m_InfoStart.m_szStart = CFX_SizeF(m_pProperties->m_rtWidget.width, - m_pProperties->m_rtWidget.height); + pPressBtn->SetPressed(); + Repaint(&pPressBtn->m_rtBtn); } void IFWL_Form::OnLButtonUp(CFWL_MsgMouse* pMsg) { diff --git a/xfa/fwl/core/ifwl_form.h b/xfa/fwl/core/ifwl_form.h index c71bb1816e..013ef92a52 100644 --- a/xfa/fwl/core/ifwl_form.h +++ b/xfa/fwl/core/ifwl_form.h @@ -55,14 +55,6 @@ class CFWL_SysBtn { uint32_t m_dwState; }; -struct RestoreInfo { - RestoreInfo(); - ~RestoreInfo(); - - CFX_PointF m_ptStart; - CFX_SizeF m_szStart; -}; - class CFWL_MsgMouse; class CFWL_NoteLoop; class IFWL_Widget; @@ -144,7 +136,6 @@ class IFWL_Form : public IFWL_Widget { CFWL_SysBtn* m_pCaptionBox; std::unique_ptr m_pNoteLoop; IFWL_Widget* m_pSubFocus; - RestoreInfo m_InfoStart; FX_FLOAT m_fCXBorder; FX_FLOAT m_fCYBorder; int32_t m_iCaptureBtn; -- cgit v1.2.3