summaryrefslogtreecommitdiff
path: root/formula/source/ui
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-01-16 14:13:31 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-01-17 11:31:40 +0000
commit70fed865df7655a7ee65fa6cde51bbf93182dbbb (patch)
tree00c77d8ba47be246cd247697045fdcfe6df3ad9e /formula/source/ui
parentfb4b59f9370167696d1a67beb16b593ba86971a8 (diff)
new loplugin: useuniqueptr: forms..framework
Change-Id: I4300a13f455148b7156ac3f444c7102d63ae6db3 Reviewed-on: https://gerrit.libreoffice.org/33164 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'formula/source/ui')
-rw-r--r--formula/source/ui/resource/ModuleHelper.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/formula/source/ui/resource/ModuleHelper.cxx b/formula/source/ui/resource/ModuleHelper.cxx
index de87fa8af07a..97fbf86a9534 100644
--- a/formula/source/ui/resource/ModuleHelper.cxx
+++ b/formula/source/ui/resource/ModuleHelper.cxx
@@ -43,7 +43,7 @@ namespace formula
*/
class OModuleImpl
{
- ResMgr* m_pResources;
+ std::unique_ptr<ResMgr> m_pResources;
public:
/// ctor
@@ -55,14 +55,12 @@ public:
};
OModuleImpl::OModuleImpl()
- :m_pResources(nullptr)
{
}
OModuleImpl::~OModuleImpl()
{
- delete m_pResources;
}
@@ -73,9 +71,9 @@ ResMgr* OModuleImpl::getResManager()
if (!m_pResources)
{
// create a manager with a fixed prefix
- m_pResources = ResMgr::CreateResMgr("forui");
+ m_pResources.reset( ResMgr::CreateResMgr("forui") );
}
- return m_pResources;
+ return m_pResources.get();
}