From 76dd28afc9c0eb632a5dd20eb51704ee0bbc4b58 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 9 Oct 2018 16:27:11 +0200 Subject: loplugin:staticvar in various looks for variables that can be declared const and static i.e. they can be stored in the read-only linker segment and shared between different processes Change-Id: I8ddc6e5fa0f6b10d80c75d5952df8ddd311cf892 Reviewed-on: https://gerrit.libreoffice.org/61591 Tested-by: Jenkins Reviewed-by: Noel Grandin --- unotools/source/config/lingucfg.cxx | 4 ++-- unotools/source/misc/fontcvt.cxx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'unotools') diff --git a/unotools/source/config/lingucfg.cxx b/unotools/source/config/lingucfg.cxx index 3dfacf08a875..17749604a675 100644 --- a/unotools/source/config/lingucfg.cxx +++ b/unotools/source/config/lingucfg.cxx @@ -213,7 +213,7 @@ static struct NamesToHdl const char *pFullPropName; // full qualified name as used in configuration const char *pPropName; // property name only (atom) of above sal_Int32 const nHdl; // numeric handle representing the property -}aNamesToHdl[] = +} const aNamesToHdl[] = { {/* 0 */ "General/DefaultLocale", UPN_DEFAULT_LOCALE, UPH_DEFAULT_LOCALE}, {/* 1 */ "General/DictionaryList/ActiveDictionaries", UPN_ACTIVE_DICTIONARIES, UPH_ACTIVE_DICTIONARIES}, @@ -281,7 +281,7 @@ bool SvtLinguConfigItem::GetHdlByName( const OUString &rPropertyName, bool bFullPropName ) { - NamesToHdl *pEntry = &aNamesToHdl[0]; + NamesToHdl const *pEntry = &aNamesToHdl[0]; if (bFullPropName) { diff --git a/unotools/source/misc/fontcvt.cxx b/unotools/source/misc/fontcvt.cxx index 608a424f0f01..ea49af1d0f29 100644 --- a/unotools/source/misc/fontcvt.cxx +++ b/unotools/source/misc/fontcvt.cxx @@ -1135,7 +1135,7 @@ StarSymbolToMSMultiFontImpl::StarSymbolToMSMultiFontImpl() }; //In order of preference - const ConvertTable aConservativeTable[] = + static const ConvertTable aConservativeTable[] = { {Symbol, aAdobeSymbolTab}, {Wingdings, aWingDingsTab}, @@ -1173,7 +1173,7 @@ StarSymbolToMSMultiFontImpl::StarSymbolToMSMultiFontImpl() } //In order of preference - const ExtendedConvertTable aAgressiveTable[] = + static const ExtendedConvertTable aAgressiveTable[] = { ExtendedConvertTable(Symbol, aSymbolExtraTab2, sizeof(aSymbolExtraTab2)), -- cgit