From 7df950ac2ef484880fe3cbfb9961bed34fee191d Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Fri, 26 Oct 2018 19:42:40 +0000 Subject: Stop transfering ownership of |this| as CPWL_Wnd::Create() side-effect Instead, make it an explicit method called on the parent outside of create. Rename Create() to Realize() to be sure to catch all usages, and add the new required call. Attachment to the parent now takes place a little earlier on in the life-cycle as a result but should be ok. Precursor to converting to smart pointers. Change-Id: I45c459fcd28b5d03c428ce5809d0432506cf4ec6 Reviewed-on: https://pdfium-review.googlesource.com/c/44690 Reviewed-by: Lei Zhang Commit-Queue: Tom Sepez --- fpdfsdk/pwl/cpwl_appstream.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fpdfsdk/pwl/cpwl_appstream.cpp') diff --git a/fpdfsdk/pwl/cpwl_appstream.cpp b/fpdfsdk/pwl/cpwl_appstream.cpp index ebd47befc0..02541aa3b6 100644 --- a/fpdfsdk/pwl/cpwl_appstream.cpp +++ b/fpdfsdk/pwl/cpwl_appstream.cpp @@ -684,9 +684,9 @@ ByteString GenerateIconAppStream(CPDF_IconFit& fit, return ByteString(); CPWL_Icon icon(nullptr); - CPWL_Wnd::CreateParams cp; + CPWL_Wnd::CreateParams cp; // No parent. cp.dwFlags = PWS_VISIBLE; - icon.Create(cp); + icon.Realize(cp); icon.SetIconFit(&fit); icon.SetPDFStream(pIconStream); if (!icon.Move(rcIcon, false, false)) -- cgit v1.2.3