diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-09-05 11:53:35 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-11-10 17:11:00 +0100 |
commit | 242320d303d43a34ce2255a07783fbd51e253cd0 (patch) | |
tree | 14bd7757a57784a18d1aa2b731eb71999d14bf94 /l10ntools | |
parent | 8523fb2b37a2cdd2c3743795bb33cf30a57c5385 (diff) |
new loplugin:reducevarscope
Change-Id: Iefe922c2e0d605114d54673d63eccc5e4abd545d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102143
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'l10ntools')
-rw-r--r-- | l10ntools/source/cfgmerge.cxx | 2 | ||||
-rw-r--r-- | l10ntools/source/helpmerge.cxx | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/l10ntools/source/cfgmerge.cxx b/l10ntools/source/cfgmerge.cxx index e02e497d5d21..5715bd1c1d14 100644 --- a/l10ntools/source/cfgmerge.cxx +++ b/l10ntools/source/cfgmerge.cxx @@ -164,7 +164,6 @@ void CfgParser::ExecuteAnalyzedToken( int nToken, char *pToken ) sLastWhitespace += sToken; OString sTokenName; - OString sTokenId; bool bOutput = true; @@ -222,6 +221,7 @@ void CfgParser::ExecuteAnalyzedToken( int nToken, char *pToken ) } break; } + OString sTokenId; if ( !sSearch.isEmpty()) { OString sTemp = sToken.copy( sToken.indexOf( sSearch )); diff --git a/l10ntools/source/helpmerge.cxx b/l10ntools/source/helpmerge.cxx index abab8a5a03a1..10a9de923175 100644 --- a/l10ntools/source/helpmerge.cxx +++ b/l10ntools/source/helpmerge.cxx @@ -192,7 +192,6 @@ void HelpParser::MergeSingleFile( XMLFile* file , MergeDataFile* pMergeDataFile void HelpParser::ProcessHelp( LangHashMap* aLangHM , const OString& sCur , ResData *pResData , MergeDataFile* pMergeDataFile ){ XMLElement* pXMLElement = nullptr; - MergeEntrys *pEntrys = nullptr; if( sCur.equalsIgnoreAsciiCase("en-US") ) return; @@ -228,7 +227,7 @@ void HelpParser::ProcessHelp( LangHashMap* aLangHM , const OString& sCur , ResDa } else if( pMergeDataFile ) { - pEntrys = pMergeDataFile->GetMergeEntrys( pResData ); + MergeEntrys *pEntrys = pMergeDataFile->GetMergeEntrys( pResData ); if( pEntrys != nullptr) { pEntrys->GetText( sNewText, sCur, true ); |