[Libreoffice-commits] core.git: include/svx svx/source

Aditya (via logerrit) logerrit at kemper.freedesktop.org
Sun Sep 6 10:46:55 UTC 2020


 include/svx/gallerybinaryengineentry.hxx         |    2 +-
 svx/source/gallery2/gallerybinaryengineentry.cxx |   10 +---------
 2 files changed, 2 insertions(+), 10 deletions(-)

New commits:
commit 3c109047b1d99afa1cbf694bd93f44feb80ca648
Author:     Aditya <adityasahu1511 at gmail.com>
AuthorDate: Sat Aug 29 19:49:50 2020 +0530
Commit:     Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Sun Sep 6 12:46:10 2020 +0200

    svx: Remove GalleryBinaryEngineEntry::createGalleryStorageLocations()
    
    Initialize the member GalleryStorageLocations in the constructor only
    
    Change-Id: I0a37a1c87323d724f88b1de0aeb6151707b41853
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101642
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>

diff --git a/include/svx/gallerybinaryengineentry.hxx b/include/svx/gallerybinaryengineentry.hxx
index b0f8d7a447b3..eeb989257e3b 100644
--- a/include/svx/gallerybinaryengineentry.hxx
+++ b/include/svx/gallerybinaryengineentry.hxx
@@ -45,8 +45,8 @@ public:
     const INetURLObject& GetSdvURL() const { return mpGalleryStorageLocations->GetSdvURL(); }
     const INetURLObject& GetStrURL() const { return mpGalleryStorageLocations->GetStrURL(); }
 
-    static std::unique_ptr<GalleryBinaryStorageLocations> createGalleryStorageLocations();
     const std::unique_ptr<GalleryBinaryStorageLocations>& getGalleryStorageLocations() const
+
     {
         return mpGalleryStorageLocations;
     }
diff --git a/svx/source/gallery2/gallerybinaryengineentry.cxx b/svx/source/gallery2/gallerybinaryengineentry.cxx
index 5c7c81fb5790..7750c9ae9bc0 100644
--- a/svx/source/gallery2/gallerybinaryengineentry.cxx
+++ b/svx/source/gallery2/gallerybinaryengineentry.cxx
@@ -43,15 +43,7 @@ static bool FileExists(const INetURLObject& rURL, const OUString& rExt)
 
 GalleryBinaryEngineEntry::GalleryBinaryEngineEntry()
 {
-    mpGalleryStorageLocations = createGalleryStorageLocations();
-}
-
-std::unique_ptr<GalleryBinaryStorageLocations>
-GalleryBinaryEngineEntry::createGalleryStorageLocations()
-{
-    std::unique_ptr<GalleryBinaryStorageLocations> pGalleryStorageLocations
-        = std::make_unique<GalleryBinaryStorageLocations>();
-    return pGalleryStorageLocations;
+    mpGalleryStorageLocations = std::make_unique<GalleryBinaryStorageLocations>();
 }
 
 void GalleryBinaryEngineEntry::setStorageLocations(INetURLObject& rURL)


More information about the Libreoffice-commits mailing list