From d0409afc6a994a3e24043b8a96c83c022bcaa189 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 25 May 2017 15:53:57 -0700 Subject: Mass conversion of remaining class members (non-xfa) Change-Id: I8365ba80e3395d59a3cf35dbd9d9162e86e712e3 Reviewed-on: https://pdfium-review.googlesource.com/5970 Commit-Queue: Tom Sepez Reviewed-by: Lei Zhang --- fpdfsdk/pdfwindow/PWL_Wnd.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'fpdfsdk/pdfwindow/PWL_Wnd.cpp') diff --git a/fpdfsdk/pdfwindow/PWL_Wnd.cpp b/fpdfsdk/pdfwindow/PWL_Wnd.cpp index 5523c59317..1db79b4bc7 100644 --- a/fpdfsdk/pdfwindow/PWL_Wnd.cpp +++ b/fpdfsdk/pdfwindow/PWL_Wnd.cpp @@ -180,9 +180,9 @@ class CPWL_MsgControl { private: std::vector m_aMousePath; std::vector m_aKeyboardPath; - CPWL_Wnd* m_pCreatedWnd; - CPWL_Wnd* m_pMainMouseWnd; - CPWL_Wnd* m_pMainKeyboardWnd; + CFX_UnownedPtr m_pCreatedWnd; + CFX_UnownedPtr m_pMainMouseWnd; + CFX_UnownedPtr m_pMainKeyboardWnd; }; CPWL_Wnd::CPWL_Wnd() @@ -594,10 +594,7 @@ void* CPWL_Wnd::GetAttachedData() const { } CPWL_ScrollBar* CPWL_Wnd::GetVScrollBar() const { - if (HasFlag(PWS_VSCROLL)) - return m_pVScrollBar; - - return nullptr; + return HasFlag(PWS_VSCROLL) ? m_pVScrollBar.Get() : nullptr; } void CPWL_Wnd::CreateScrollBar(const PWL_CREATEPARAM& cp) { @@ -885,7 +882,7 @@ void CPWL_Wnd::SetChildMatrix(const CFX_Matrix& mt) { const CPWL_Wnd* CPWL_Wnd::GetFocused() const { CPWL_MsgControl* pMsgCtrl = GetMsgControl(); - return pMsgCtrl ? pMsgCtrl->m_pMainKeyboardWnd : nullptr; + return pMsgCtrl ? pMsgCtrl->m_pMainKeyboardWnd.Get() : nullptr; } void CPWL_Wnd::EnableWindow(bool bEnable) { -- cgit v1.2.3