summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-06-21 15:32:52 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-06-22 20:11:50 +0200
commit200ca388246e525f6e8f909766977f534c0c897e (patch)
treea1ddcd356bddada68d1510eb409721b6b2564562 /include
parentac9db25da2d78f8ecc2ce68ad622cc6012972494 (diff)
teach useuniqueptr loplugin about calling delete on a param
which is often a useful indicator that the callers can be made to use std::unique_ptr Change-Id: Idb1745d1f58dbcf389c9f60f1a5728d7d092ade5 Reviewed-on: https://gerrit.libreoffice.org/56238 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r--include/svx/gallery1.hxx9
-rw-r--r--include/tools/config.hxx3
2 files changed, 5 insertions, 7 deletions
diff --git a/include/svx/gallery1.hxx b/include/svx/gallery1.hxx
index 66474d17180b..989603e46deb 100644
--- a/include/svx/gallery1.hxx
+++ b/include/svx/gallery1.hxx
@@ -86,10 +86,6 @@ class GalleryThemeCacheEntry;
class SVX_DLLPUBLIC Gallery : public SfxBroadcaster
{
- // only for gengal utility!
- friend Gallery* createGallery( const OUString& );
- friend void disposeGallery( Gallery* );
-
typedef std::vector<GalleryThemeCacheEntry*> GalleryCacheThemeList;
private:
@@ -108,12 +104,13 @@ private:
SAL_DLLPRIVATE GalleryTheme* ImplGetCachedTheme( const GalleryThemeEntry* pThemeEntry );
SAL_DLLPRIVATE void ImplDeleteCachedTheme( GalleryTheme const * pTheme );
- Gallery( const OUString& rMultiPath );
- virtual ~Gallery() override;
Gallery& operator=( Gallery const & ) = delete; // MSVC2015 workaround
Gallery( Gallery const & ) = delete; // MSVC2015 workaround
public:
+ // only for gengal utility!
+ Gallery( const OUString& rMultiPath );
+ virtual ~Gallery() override;
static Gallery* GetGalleryInstance();
diff --git a/include/tools/config.hxx b/include/tools/config.hxx
index d6a00aa61d64..76e4270b5e9d 100644
--- a/include/tools/config.hxx
+++ b/include/tools/config.hxx
@@ -21,6 +21,7 @@
#include <tools/toolsdllapi.h>
#include <rtl/ustring.hxx>
+#include <memory>
struct ImplConfigData;
struct ImplGroupData;
@@ -30,7 +31,7 @@ class SAL_WARN_UNUSED TOOLS_DLLPUBLIC Config
private:
OUString maFileName;
OString maGroupName;
- ImplConfigData* mpData;
+ std::unique_ptr<ImplConfigData> mpData;
ImplGroupData* mpActGroup;
sal_uInt32 mnDataUpdateId;