diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-04-12 12:48:30 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-04-12 13:57:13 +0200 |
commit | 6629bdff20602935f042838ede5e8986a120b5f0 (patch) | |
tree | 6581d602b78812dbf1562de0953079ec3008f352 /vcl/source/window/window2.cxx | |
parent | 00a9b9bcd12bacafa2d81a11233b9c88669da6f1 (diff) |
use more unique_ptr in ImplSVWinData
Change-Id: Id1d42e2de480e8ec248e5716ababc8bddfc905ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150276
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/window/window2.cxx')
-rw-r--r-- | vcl/source/window/window2.cxx | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index 6a6f20dab5a7..46d8bd7f8881 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -268,7 +268,7 @@ void Window::StartTracking( StartTrackingFlags nFlags ) if ( !mpWindowImpl->mbUseFrameData && (nFlags & (StartTrackingFlags::ScrollRepeat | StartTrackingFlags::ButtonRepeat)) ) { - pSVData->mpWinData->mpTrackTimer = new AutoTimer("vcl::Window pSVData->mpWinData->mpTrackTimer"); + pSVData->mpWinData->mpTrackTimer.reset(new AutoTimer("vcl::Window pSVData->mpWinData->mpTrackTimer")); if ( nFlags & StartTrackingFlags::ScrollRepeat ) pSVData->mpWinData->mpTrackTimer->SetTimeout( MouseSettings::GetScrollRepeat() ); @@ -304,10 +304,7 @@ void Window::EndTracking( TrackingEventFlags nFlags ) return; if ( !mpWindowImpl->mbUseFrameData && pSVData->mpWinData->mpTrackTimer ) - { - delete pSVData->mpWinData->mpTrackTimer; - pSVData->mpWinData->mpTrackTimer = nullptr; - } + pSVData->mpWinData->mpTrackTimer.reset(); mpWindowImpl->mpFrameData->mpTrackWin = pSVData->mpWinData->mpTrackWin = nullptr; pSVData->mpWinData->mnTrackFlags = StartTrackingFlags::NONE; |