summaryrefslogtreecommitdiff
path: root/basctl/source/basicide/baside2.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-05-17 15:31:21 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-05-28 08:45:44 +0200
commit4b5699bff586dd923123fbfd949c9bf03e491ed7 (patch)
tree336ec76d3b1026291d46e79de6605236cfc85595 /basctl/source/basicide/baside2.cxx
parent0f30c9a1ef185a76c353349f497e576cfce0cd13 (diff)
loplugin:useuniqueptr in BreakPointList
and simplify the surrounding code Change-Id: Ie4b24008a1c7d30d43ba562d14ddc14d1a4569b6 Reviewed-on: https://gerrit.libreoffice.org/54845 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basctl/source/basicide/baside2.cxx')
-rw-r--r--basctl/source/basicide/baside2.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index d85eac5a1b39..217075194460 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -510,13 +510,13 @@ void ModulWindow::ToggleBreakPoint( sal_uLong nLine )
if ( pBrk ) // remove
{
m_xModule->ClearBP( static_cast<sal_uInt16>(nLine) );
- delete GetBreakPoints().remove( pBrk );
+ GetBreakPoints().remove( pBrk );
}
else // create one
{
if ( m_xModule->SetBP( static_cast<sal_uInt16>(nLine)) )
{
- GetBreakPoints().InsertSorted( new BreakPoint( nLine ) );
+ GetBreakPoints().InsertSorted( BreakPoint( nLine ) );
if ( StarBASIC::IsRunning() )
{
for ( sal_uInt16 nMethod = 0; nMethod < m_xModule->GetMethods()->Count(); nMethod++ )