summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-08-28 14:43:10 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-08-29 11:12:47 +0200
commit3dfc17ed6334c619228668ffeff591bc75d32025 (patch)
treeb2c985c9557151e120ddb10c4cc82bda4d7835ce /unotools
parentf8e989c2384250d30f84651eb03673fb8d8dd096 (diff)
loplugin:constantparam (3)
Change-Id: Ifc47bb8e096c9a8563021b2fcb44199577740746 Reviewed-on: https://gerrit.libreoffice.org/59747 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/i18n/localedatawrapper.cxx13
1 files changed, 5 insertions, 8 deletions
diff --git a/unotools/source/i18n/localedatawrapper.cxx b/unotools/source/i18n/localedatawrapper.cxx
index 160c48d5ae88..62bf2b214cfd 100644
--- a/unotools/source/i18n/localedatawrapper.cxx
+++ b/unotools/source/i18n/localedatawrapper.cxx
@@ -1213,16 +1213,13 @@ static sal_Unicode* ImplAdd2UNum( sal_Unicode* pBuf, sal_uInt16 nNumber, bool bL
return pBuf;
}
-static sal_Unicode* ImplAdd9UNum( sal_Unicode* pBuf, sal_uInt32 nNumber, bool bLeading )
+static sal_Unicode* ImplAdd9UNum( sal_Unicode* pBuf, sal_uInt32 nNumber )
{
DBG_ASSERT( nNumber < 1000000000, "ImplAdd9UNum() - Number >= 1000000000" );
std::ostringstream ostr;
- if (bLeading)
- {
- ostr.fill('0');
- ostr.width(9);
- }
+ ostr.fill('0');
+ ostr.width(9);
ostr << nNumber;
std::string aStr = ostr.str();
for(const char *pAB= aStr.c_str(); *pAB != '\0'; ++pAB, ++pBuf)
@@ -1436,7 +1433,7 @@ OUString LocaleDataWrapper::getTime( const tools::Time& rTime, bool bSec, bool b
if ( b100Sec )
{
pBuf = ImplAddString( pBuf, getTime100SecSep() );
- pBuf = ImplAdd9UNum( pBuf, rTime.GetNanoSec(), true );
+ pBuf = ImplAdd9UNum( pBuf, rTime.GetNanoSec() );
}
}
@@ -1508,7 +1505,7 @@ OUString LocaleDataWrapper::getDuration( const tools::Time& rTime, bool bSec, bo
if ( b100Sec )
{
pBuf = ImplAddString( pBuf, getTime100SecSep() );
- pBuf = ImplAdd9UNum( pBuf, rTime.GetNanoSec(), true );
+ pBuf = ImplAdd9UNum( pBuf, rTime.GetNanoSec() );
}
}