[Libreoffice-commits] core.git: desktop/source

Mike Kaganski (via logerrit) logerrit at kemper.freedesktop.org
Wed Jul 24 03:19:23 UTC 2019


 desktop/source/lib/init.cxx |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit f1fda07e126ddb1333ecbd2429ede8098ac9f1c0
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Wed Jul 24 04:10:04 2019 +0200
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Wed Jul 24 05:18:23 2019 +0200

    Drop unneeded initialization
    
    Change-Id: Ieac1a0acb97664f3b86e2524cab79fd278f42e0e
    Reviewed-on: https://gerrit.libreoffice.org/76210
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index b553ba6b8b17..5a908f2dd8f6 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2216,15 +2216,12 @@ static void doc_iniUnoCommands ()
 
     for (const auto & sUnoCommand : sUnoCommands)
     {
-        const SfxSlot* pSlot = nullptr;
-
         aCommandURL.Complete = sUnoCommand;
         xParser->parseStrict(aCommandURL);
-        pSlot = rSlotPool.GetUnoSlot(aCommandURL.Path);
 
         // when null, this command is not supported by the given component
         // (like eg. Calc does not have ".uno:DefaultBullet" etc.)
-        if (pSlot)
+        if (const SfxSlot* pSlot = rSlotPool.GetUnoSlot(aCommandURL.Path))
         {
             // Initialize slot to dispatch .uno: Command.
             pViewFrame->GetBindings().GetDispatch(pSlot, aCommandURL, false);


More information about the Libreoffice-commits mailing list