summaryrefslogtreecommitdiff
path: root/i18npool
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2011-05-04 22:58:22 +0200
committerJulien Nabet <serval2412@yahoo.fr>2011-05-04 22:58:22 +0200
commitdc135ac4c097ef286de8a5ef4eff94e793567346 (patch)
treec3291fe104693a01227d56c3fc9df904215e8a5d /i18npool
parentdd1041f12687d9735d55b09bab81165989d9044d (diff)
Some cppcheck cleaning
Diffstat (limited to 'i18npool')
-rw-r--r--i18npool/source/calendar/calendar_hijri.cxx3
-rw-r--r--i18npool/source/search/levdis.cxx2
2 files changed, 2 insertions, 3 deletions
diff --git a/i18npool/source/calendar/calendar_hijri.cxx b/i18npool/source/calendar/calendar_hijri.cxx
index 4921c90f2223..ec0e86baf24e 100644
--- a/i18npool/source/calendar/calendar_hijri.cxx
+++ b/i18npool/source/calendar/calendar_hijri.cxx
@@ -269,12 +269,11 @@ Calendar_hijri::getGregorianDay(sal_Int32 lJulianDay, sal_Int32 *pnDay, sal_Int3
{
/* working variables */
long lFactorA, lFactorB, lFactorC, lFactorD, lFactorE;
- long lAdjust;
/* test whether to adjust for the Gregorian calendar crossover */
if (lJulianDay >= GREGORIAN_CROSSOVER) {
/* calculate a small adjustment */
- lAdjust = (long) (((float) (lJulianDay - 1867216) - 0.25) / 36524.25);
+ long lAdjust = (long) (((float) (lJulianDay - 1867216) - 0.25) / 36524.25);
lFactorA = lJulianDay + 1 + lAdjust - ((long) (0.25 * lAdjust));
diff --git a/i18npool/source/search/levdis.cxx b/i18npool/source/search/levdis.cxx
index 252421fa25ce..fe1d1833e944 100644
--- a/i18npool/source/search/levdis.cxx
+++ b/i18npool/source/search/levdis.cxx
@@ -307,12 +307,12 @@ int WLevDistance::WLD( const sal_Unicode* cString, sal_Int32 nStringLen )
// aus Userwerten nOtherX, nShorterY, nLongerZ, bRelaxed
int WLevDistance::CalcLPQR( int nX, int nY, int nZ, bool bRelaxed )
{
- int nMid, nMax;
if ( nX < 0 ) nX = 0; // nur positive Werte
if ( nY < 0 ) nY = 0;
if ( nZ < 0 ) nZ = 0;
if (0 == Min3( nX, nY, nZ )) // mindestens einer 0
{
+ int nMid, nMax;
nMax = Max3( nX, nY, nZ ); // entweder 0 bei drei 0 oder Max
if ( 0 == (nMid = Mid3( nX, nY, nZ )) ) // sogar zwei 0
nLimit = nMax; // entweder 0 oder einziger >0