Kaydet (Commit) 311c5a98 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:useuniqueptr in MediaWindowImpl

Change-Id: I45c9e33578f23ed368b4bff92a72b37e3c98e8e3
Reviewed-on: https://gerrit.libreoffice.org/54176Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 89507e35
......@@ -164,10 +164,8 @@ void MediaWindowImpl::dispose()
mpMediaWindow = nullptr;
delete mpEmptyBmpEx;
mpEmptyBmpEx = nullptr;
delete mpAudioBmpEx;
mpAudioBmpEx = nullptr;
mpEmptyBmpEx.reset();
mpAudioBmpEx.reset();
mpMediaWindowControl.disposeAndClear();
mpChildWindow.disposeAndClear();
......@@ -578,16 +576,16 @@ void MediaWindowImpl::Paint(vcl::RenderContext& rRenderContext, const tools::Rec
if (!mxPlayer.is())
{
if (!mpEmptyBmpEx)
mpEmptyBmpEx = new BitmapEx(AVMEDIA_BMP_EMPTYLOGO);
mpEmptyBmpEx.reset(new BitmapEx(AVMEDIA_BMP_EMPTYLOGO));
pLogo = mpEmptyBmpEx;
pLogo = mpEmptyBmpEx.get();
}
else if (!mxPlayerWindow.is())
{
if (!mpAudioBmpEx)
mpAudioBmpEx = new BitmapEx(AVMEDIA_BMP_AUDIOLOGO);
mpAudioBmpEx.reset(new BitmapEx(AVMEDIA_BMP_AUDIOLOGO));
pLogo = mpAudioBmpEx;
pLogo = mpAudioBmpEx.get();
}
if (!mpChildWindow)
......
......@@ -149,8 +149,8 @@ private:
rtl::Reference<MediaEventListenersImpl> mxEvents;
VclPtr<MediaChildWindow> mpChildWindow;
VclPtr<MediaWindowControl> mpMediaWindowControl;
BitmapEx* mpEmptyBmpEx;
BitmapEx* mpAudioBmpEx;
std::unique_ptr<BitmapEx> mpEmptyBmpEx;
std::unique_ptr<BitmapEx> mpAudioBmpEx;
};
}} // end namespace avmedia::priv
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment