summaryrefslogtreecommitdiff
path: root/vcl/osx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/osx')
-rw-r--r--vcl/osx/salmenu.cxx14
1 files changed, 3 insertions, 11 deletions
diff --git a/vcl/osx/salmenu.cxx b/vcl/osx/salmenu.cxx
index c12eb41c236f..ff400fdd4810 100644
--- a/vcl/osx/salmenu.cxx
+++ b/vcl/osx/salmenu.cxx
@@ -233,19 +233,11 @@ void AquaSalInstance::DestroyMenu( SalMenu* pSalMenu )
delete pSalMenu;
}
-SalMenuItem* AquaSalInstance::CreateMenuItem( const SalItemParams* pItemData )
+std::unique_ptr<SalMenuItem> AquaSalInstance::CreateMenuItem( const SalItemParams & rItemData )
{
- if( !pItemData )
- return nullptr;
+ AquaSalMenuItem *pSalMenuItem = new AquaSalMenuItem( &rItemData );
- AquaSalMenuItem *pSalMenuItem = new AquaSalMenuItem( pItemData );
-
- return pSalMenuItem;
-}
-
-void AquaSalInstance::DestroyMenuItem( SalMenuItem* pSalMenuItem )
-{
- delete pSalMenuItem;
+ return std::unique_ptr<SalMenuItem>(pSalMenuItem);
}
/*