summaryrefslogtreecommitdiff
path: root/i18npool/source/localedata/LocaleNode.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-04-15 09:04:38 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-04-15 19:25:23 +0200
commit4cc702a7055c0e12c7cbf5e5e359e7cbc8b88020 (patch)
treef09f7167cdca22f16edb5a998c2f9714e4bdc698 /i18npool/source/localedata/LocaleNode.cxx
parent393aa2b3dee9cca84a215635060b369a962ab179 (diff)
loplugin:buriedassign in f,h,i*
Change-Id: Iac753e528e13cb2565832a484e87f88061bbc91e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92239 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'i18npool/source/localedata/LocaleNode.cxx')
-rw-r--r--i18npool/source/localedata/LocaleNode.cxx16
1 files changed, 9 insertions, 7 deletions
diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx
index 38c0bce2055d..dd23465bea19 100644
--- a/i18npool/source/localedata/LocaleNode.cxx
+++ b/i18npool/source/localedata/LocaleNode.cxx
@@ -688,14 +688,16 @@ void LCFormatNode::generateCode (const OFileWriter &of) const
case cssi::NumberFormatIndex::CURRENCY_1000DEC2 :
// Remember the currency symbol if present.
{
- sal_Int32 nStart;
- if (sTheCompatibleCurrency.isEmpty() &&
- ((nStart = n->getValue().indexOf("[$")) >= 0))
+ if (sTheCompatibleCurrency.isEmpty())
{
- const OUString& aCode( n->getValue());
- sal_Int32 nHyphen = aCode.indexOf( '-', nStart);
- if (nHyphen >= nStart + 3)
- sTheCompatibleCurrency = aCode.copy( nStart + 2, nHyphen - nStart - 2);
+ sal_Int32 nStart = n->getValue().indexOf("[$");
+ if (nStart >= 0)
+ {
+ const OUString& aCode( n->getValue());
+ sal_Int32 nHyphen = aCode.indexOf( '-', nStart);
+ if (nHyphen >= nStart + 3)
+ sTheCompatibleCurrency = aCode.copy( nStart + 2, nHyphen - nStart - 2);
+ }
}
}
[[fallthrough]];