diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-08-18 09:43:04 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-08-18 16:02:25 +0200 |
commit | 65ae6af9f460b1a28f3e07480347ff7f90adae38 (patch) | |
tree | 49bfeb1e25724d3b5539b7b5843d38b7531cf65f /desktop/source/lib/init.cxx | |
parent | c7d1bb119d88faaafb53d65ad8907ede97d89c8c (diff) |
loplugin:unusedvarsglobal
tackle some read-only vars.
Mark some of them const to make it obvious they are not really used, and
to make the constantparam plugin see more data.
Change-Id: Ia25927745866746aa1aa9d5affd5857ad9f9ee24
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100895
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop/source/lib/init.cxx')
-rw-r--r-- | desktop/source/lib/init.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 30116199123c..78f152166acd 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -720,22 +720,21 @@ std::string extractPrivateKey(const std::string & privateKey) OUString lcl_getCurrentDocumentMimeType(LibLODocument_Impl* pDocument) { - OUString aMimeType; SfxBaseModel* pBaseModel = dynamic_cast<SfxBaseModel*>(pDocument->mxComponent.get()); if (!pBaseModel) - return aMimeType; + return ""; SfxObjectShell* pObjectShell = pBaseModel->GetObjectShell(); if (!pObjectShell) - return aMimeType; + return ""; SfxMedium* pMedium = pObjectShell->GetMedium(); if (!pMedium) - return aMimeType; + return ""; auto pFilter = pMedium->GetFilter(); if (!pFilter) - return aMimeType; + return ""; return pFilter->GetMimeType(); } |