vcl/source/control/calendar.cxx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
New commits: commit 0fd545eed33e85544065a383e3beace5401e870e Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Thu May 27 15:45:58 2021 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Thu May 27 20:47:42 2021 +0200 no need to allocate these on the heap Change-Id: I6933260f589c67f463ee60572a31c52c6be7eb66 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116262 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/vcl/source/control/calendar.cxx b/vcl/source/control/calendar.cxx index c03740f3063c..ba69a780b6ea 100644 --- a/vcl/source/control/calendar.cxx +++ b/vcl/source/control/calendar.cxx @@ -808,7 +808,7 @@ void Calendar::ImplUpdateSelection( IntDateSet* pOld ) void Calendar::ImplMouseSelect( const Date& rDate, sal_uInt16 nHitTest ) { - std::unique_ptr<IntDateSet> pOldSel(new IntDateSet( *mpSelectTable )); + IntDateSet aOldSel( *mpSelectTable ); Date aOldDate = maCurDate; Date aTempDate = rDate; @@ -824,13 +824,13 @@ void Calendar::ImplMouseSelect( const Date& rDate, sal_uInt16 nHitTest ) ImplCalendarSelectDate( mpSelectTable.get(), maCurDate, true ); } - bool bNewSel = *pOldSel != *mpSelectTable; + bool bNewSel = aOldSel != *mpSelectTable; if ( (maCurDate != aOldDate) || bNewSel ) { HideFocus(); if ( bNewSel ) - ImplUpdateSelection( pOldSel.get() ); - if ( !bNewSel || pOldSel->find( aOldDate.GetDate() ) == pOldSel->end() ) + ImplUpdateSelection( &aOldSel ); + if ( !bNewSel || aOldSel.find( aOldDate.GetDate() ) == aOldSel.end() ) ImplUpdateDate( aOldDate ); // assure focus rectangle is displayed again if ( HasFocus() || !bNewSel @@ -961,13 +961,13 @@ void Calendar::ImplEndTracking( bool bCancel ) if ( !bSpinDown ) { - std::unique_ptr<IntDateSet> pOldSel(new IntDateSet( *mpSelectTable )); + IntDateSet aOldSel( *mpSelectTable ); Date aOldDate = maCurDate; maCurDate = maOldCurDate; *mpSelectTable = *mpOldSelectTable; HideFocus(); - ImplUpdateSelection( pOldSel.get() ); - if ( pOldSel->find( aOldDate.GetDate() ) == pOldSel->end() ) + ImplUpdateSelection( &aOldSel ); + if ( aOldSel.find( aOldDate.GetDate() ) == aOldSel.end() ) ImplUpdateDate( aOldDate ); // assure focus rectangle is displayed again if ( HasFocus() || mpSelectTable->find( maCurDate.GetDate() ) == mpSelectTable->end() ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits