summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-05-27 15:45:58 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-05-27 20:47:42 +0200
commit0fd545eed33e85544065a383e3beace5401e870e (patch)
treebe4f57c89d9c6897fe7c84ede204864e2fc25327 /vcl
parent211b13725152d3af49f28a88b3dc260c923377aa (diff)
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.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/control/calendar.cxx14
1 files changed, 7 insertions, 7 deletions
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() )